Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Regular Expressions in JavaScript!
You have completed Regular Expressions in JavaScript!
Preview
Captured groups make regular expressions even more powerful by allowing you to pull out patterns from within the matched pattern. Then you can rearrange the matched strings as needed.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
We've seen that regular expressions
normally work one character at a time.
0:00
For example, in this regular expression,
0:00
the question mark applies
only to the single letter e.
0:03
It matches zero or one e character.
0:07
So this regex matches axe spelled with or
without a final e.
0:09
But I also showed you how you can use
parentheses to group multiple characters.
0:15
So we can treat character
sequences like single characters.
0:20
For example, by adding parentheses in this
regular expression, we can treat the www.,
0:24
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up