Learn Regular Expressions

This tutorial teaches you regex in JavaScript through 34 screencasts. It explains regular expressions step-by-step from basic to advanced so that you don't fall off along the way. This ensures that you finally learn regex once and for all.


Avatar of freeCodeCamp

Duration
46 min

Intermediate
TierFree
Follow
Start Course
Content
About
Regular Expressions Intro
Using the Test Method
Frontend Career Path
Match Literal Strings
Match a Literal String with Different Possibilities
Ignore Case While Matching
Extract Matches
Find More Than the First Match
Match Anything with Wildcard Period
Match Single Character with Multiple Possibilities
Match Letters of the Alphabet
Match Numbers and Letters of the Alphabet
Match Characters that Occur One or More Times
Match Characters that Occur One or More Times
Match Characters that Occur Zero or More Times
Find Characters with Lazy Matching
Find One or More Criminals in a Hunt
Match Beginning String Patterns
Match Ending String Patterns
Match All Letters and Numbers
Match Everything But Letters and Numbers
Match All Numbers
Match All Non-Numbers
Restrict Possible Usernames
Match Whitespace
Match Non-Whitespace Characters
Specify Upper and Lower Number of Matches
Specify Only the Lower Number of Matches
Specify Exact Number of Matches
Check for All or None
Positive and Negative Lookahead
Reuse Patterns Using Capture Groups
Use Capture Groups to Search and Replace
Remove Whitespace from Start and End
Regular Expressions Outro