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
Validate a phone number, ensuring it's entered following the pattern `(555) 555-5555`.
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
see if you can complete this function
before I show you my solution.
0:00
One quick reminder though, don't forget
that parentheses are special characters.
0:03
So to indicate you want to
match those literal characters,
0:09
you need to escape them with a backslash,
like this or like that.
0:12
Here's how I broke down this problem.
0:20
I see three groups of numbers,
two groups of three and one group of four.
0:22
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