Chapter 10. Pattern Matching with Regular Expressions
This chapter begins by defining the syntax that regular expressions use to describe textual patterns. Then it moves on to describe the String and RegExp methods that use regular expressions.
Defining Regular Expressions
expressions are represented by
objects. RegExp objects may be created with the
RegExp( ) constructor, of course, but they are more often created
using a special literal syntax. Just as string literals are specified
as characters within quotation marks,
regular expression literals are
specified as characters within a pair of slash
contain lines like this:
var pattern ...