Introduction to Regular Expressions

These sections introduce the concept of regular expressions and explain how to create and use them in JScript.

While each topic stands on its own, it is recommended that you peruse these topics sequentially to develop the best understanding of the material. Many topics rely upon the understanding of a feature or concept that was introduced in a previous topic in the sequence.

In This Section

  • Regular Expressions
    Explains the concept of regular expressions by comparing with concepts that are already familiar to most readers.

  • Uses for Regular Expressions
    Indicates how regular expressions extend conventional search criteria through practical examples.

  • Regular Expression Syntax
    Explains the characters that comprise a regular expression, the characters that comprise metacharacters, and the behavior of metacharacters.

  • Build a Regular Expression
    Describes the components of a regular expression and the relationship between the components and delimiters.

  • Order of Precedence
    Explains how regular expressions are evaluated and how the sequence and syntax of the regular expression effects the result.

  • Ordinary Characters
    Distinguishes ordinary characters from metacharacters and illustrates how to combine single-character regular expressions to create larger expressions.

  • Special Characters in JScript
    Explains the concept of escaping characters and how to create a regular expression that matches metacharacters.

  • Non-Printable Characters
    Lists the escape sequences that are used to represent non-printing characters in a regular expression.

  • Character Matching
    Illustrates how regular expressions use periods, escape characters, and brackets to create sequences that return specific results.

  • Quantifiers in JScript
    Explains how to create regular expressions when you cannot specify how many characters comprise a match.

  • Anchors
    Indicates how to fix a regular expression to either the beginning of a line or the end of a line and how to create regular expressions that occur within a word, at the beginning of a word, or at the end of a word.

  • Alternation and Grouping
    Illustrates how alternation uses the '|' character to allow a choice between two or more alternatives and how grouping works in conjunction with alternation to further refine the result.

  • Backreferences in JScript
    Explains how to create regular expressions that can access part of a stored matched pattern without recreating the regular expression that found the matched pattern.

  • .NET Framework Regular Expressions
    Clarifies how pattern-matching notation of regular expressions allows developers to quickly parse large amounts of text to find specific character patterns; to extract, edit, replace, or delete text substrings; or to add the extracted strings to a collection in order to generate a report.

  • Regular Expression Examples
    Provides a list of links to code examples that illustrate the use of regular expressions in common applications.