Array
University of Oregon

RegExp

Regular Expressions

Regular expressions are a way to describe patterns in string data. They form a small, separate language that is part of JavaScript and many other languages and tools.

In JavaScript, regular expressions are also objects (of type RegExp).

RegExp patterns are used with the exec and test methods, and with the match, replace, search, and split methods of String.

Learning Regular Expressions

  1. Read about RegExp in our textbook
  2. Read the following sections in ch. 9, Eloquent JavaScript
    Regular expressions
    Creating a regular expression
    Testing for matches
    Matching a set of characters
  3. Complete the RegExp tutorial (W3Schools).

References

Skip to toolbar