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.

Course content

01Regular Expressions Intro
1:18
02Regex Tutorial: Using the Test Method
1:08
03Regex Tutorial: Match Literal Strings
0:38
04Regex Tutorial: Match a Literal String with Different Possibilities
0:45
05Regex Tutorial: Ignore Case While Matching
0:56
06Regex Tutorial: Extract Matches
0:44

Finally a simple and interactive way to learn regular expressions 🎉

This course features freeCodeCamp's Regular Expressions curriculum recorded as Scrimba screencasts. It introduces you to regular expressions (also called regex or regexp) through the lens of JavaScript. And as this is a Scrimba course, you'll be able to experiment with the expressions whenever you want. This is crucial when learning regex, as there are a lot of details to remember. Interacting with the code makes the knowledge stick, as opposed to simply watching normal video tutorials.

About freeCodeCamp

The lectures are recorded by Beau Carnes. Beau is the man behind some of the most popular courses at freeCodeCamp's YouTube channel, so you'll be in good hands. He explains concepts clearly and thoroughly, but without wasting your time.

Good luck, and happy coding!

What you'll learn 👩‍🏫

Regex basics
Test matches
Literal strings
Case insensitive
Single character
Match letters
Match numbers
Single match
Multiple matches
Wildcards
Lazy matching
Begins with match
Ends with match
Inclusive match
Exclusive match
Whitespace match
Lookahead
Capture groups

Meet your teacher 👋

The course creator

freeCodeCamp

freeCodeCamp is a community that helps you learn to code, then get experience by contributing to open source projects used by nonprofits. Their Scrimba sceencasts are recorded by their brilliant instructor Beau Carnes and are based on their core curriculum.

Thank freeCodeCamp for the course

people love this course 😍

why you'll learn faster 🔥

secure your free spot

100,000 people can't be wrong

FAQ

What is regex used for?

Regex is short for regular expression, a regex is a string of text which you can use to create patterns that help match, locate, and manage text.

How does regex work?

Almost all modern regex flavours are based on regex-directed engines. If a match is found, the engine advances through the regex and the subject string. If a token fails to match, the engine backtracks to a previous position in the regex and the subject string where it can try a different path through the regex.

Are regular expressions important?

Regular expressions are a very terse way to express how to match patterns in text. The requirement to parse and extract data from text or to validate that some text conforms to a specific pattern comes up very often in programming. It is important to learn about regex and at least know what to google when you encounter one or need to use it.