JScript
Introduction to Regular Expressions (Scripting)

Updated: August 2009

These topics introduce the concept of regular expressions and explain how to create and use them.

A regular expression describes one or more strings to match when you search a body of text. The expression serves as character pattern to compare with the text being searched. You can use regular expressions to search for patterns in a string, replace text, and extract substrings.

In This Section

Uses for Regular Expressions

Illustrates circumstances that would benefit from the use of regular expressions.

Creating a Regular Expression

Explains how to construct a regular expression.

Regular Expression Programming

Provides code examples that show how to search for patterns in a string, replace text, and extract substrings.

Regular Expression Syntax

Summarizes the elements that make up the regular expression syntax and provides examples.

Lists of Matching Characters

Describes how to match a single character from a list of characters or range of characters.

Quantifiers

Explains how to search for a character or set of characters that is repeated a specific number of times.

Anchors

Explains how to specify that a pattern that you are searching for has to appear either at the start or end of the searched string, or the start or end of a line or word in the searched string.

Alternation and Grouping

Explains how to specify that two or more alternatives both represent a pattern match, and how grouping affects the outcome of an expression.

Backreferences

Explains how to reference a stored matched pattern that is enclosed in the regular expression itself. Also explains how to reference a stored matched pattern when replacing text.

Related Sections

JScript User's Guide (Windows Scripting - JScript)

Provides information about how to use JScript and includes a guide to regular expressions.

VBScript User's Guide

Provides information about how to use VBScript and includes a guide to regular expressions.

Change History

Date

History

Reason

August 2009

Modified topic descriptions.

Information enhancement.

Tags : expression vbs


Page view tracker