Build a Regular Expression
The construction of regular expressions is analogous to the construction of arithmetic expressions. That is, a variety of metacharacters and operators combine small expressions to create large expressions.
You construct a regular expression by putting the various components of the expression pattern between a pair of delimiters. For JScript, the delimiters are forward slash (/) characters. For example:
In the above example, the regular expression pattern (expression) is stored in the Pattern property of the RegExp object.
The components of a regular expression can be individual characters, sets of characters, ranges of characters, choices between characters, or any combination of all of these components.