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
When users enter data your program doesn't expect, errors can result. That's why almost any form you visit on the web is validated. Learn what validation is and how regular expressions can help validate forms.
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
Now that you have an idea of what regular
expressions are an how to us them,
0:00
let's put them to work in a project.
0:00
We'll be using regexes to solve
a common problem in web development,
0:03
validating user input.
0:07
When filling out an online registration
form, you may have incorrectly
0:09
entered your email address, or forgotten
to type a digit of your phone number.
0:14
Validation is the process of guarding
against receiving bad or inaccurate data.
0:18
Regular expressions can help your
program know whether to accept the value
0:24
by matching the input with
the pattern you expect.
0:28
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