Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.