Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

Regular Expressions in JavaScript Course (How To)

via Treehouse

Overview

Learn how regular expressions can help you validate forms, search and replace strings, and more. Regular expressions match patterns in strings. Pattern matching is a powerful tool that programs can use to "understand" the text users type in.

What you'll learn

  • regular expressions
  • form validation
  • match
  • replace

Syllabus

Regular Expressions

Learn what an expression is and get started working with them right away.

Chevron 10 steps
  • What is a Regular Expression?

    4:01

  • Matching Specific Characters

    4:36

  • Matching Character Ranges

    1:58

  • Using Wildcard Characters

    3:51

  • Finding Repeated Characters

    4:47

  • Excluding Characters

    3:13

  • Alternation

    1:26

  • Groups

    3:08

  • Beginning and Ending of Strings

    2:01

  • Review: Regular Expressions

    5 questions

Validating a Form

Validate a form using regular expressions.

Chevron 10 steps
  • What is Validation?

    3:57

  • Using Regular Expressions in JavaScript

    2:33

  • Flags

    4:12

  • Review: Regular Expressions with JavaScript

    5 questions

  • Validating a Username

    5:16

  • Validating a Password

    3:53

  • Validating a Phone Number

    1:50

  • Validating an Email

    3:30

  • Form Validation

    2 objectives

  • Review: Validating with Regular Expressions

    5 questions

Reformatting User Input

Manipulate data you get from the user and display it in a different format.

Chevron 5 steps
  • Using Replace with Captured Groups

    6:03

  • A Better Telephone Number Validator

    3:29

  • Reformatting a Telephone Number

    3:47

  • Reformatting Text

    1 objective

  • Review: Course Review

    5 questions

Reviews

Start your review of Regular Expressions in JavaScript Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.