Chapter 11. Pattern Matching with Regular Expressions
This chapter begins by defining the syntax that regular expressions use to describe textual patterns. It then moves on to describe the String and RegExp methods that use regular expressions.
Defining Regular Expressions
RegExp 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
/) characters. Thus, your
var pattern ...