Introduction to Regular Expressions (Scripting)

Switch View :
ScriptFree
JScript
Introduction to Regular Expressions (Scripting)

Updated: January 2010

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 Subexpressions

Explains how to specify a choice between two or more alternatives in a regular expression. Also explains how to create a subexpression.

Backreferences

Explains how to refer to a subexpression from within a regular expression, and from within a replacement string.

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

January 2010

Modified topic descriptions.

Information enhancement.

August 2009

Modified topic descriptions.

Information enhancement.

Community Content

robert elizardo
Microsoft RegExp not installed - IIS5
How do I get Microsoft RegExp installed on IIS5?

I get this from the XCENT (xcDiag.asp) script on my server:
It reveals that RegExp is not installed on the server & it is required.
I do have an app that fails to work correctly complaining about this.

How do I get this installed?

===
Component            Type    Installed    Req    Opt    Information
Microsoft RegExp        Misc.    No            X    

Microsoft RegExp:
The Microsoft Regular Expression object is required. This is a critical component that must be installed for an ASP application's advanced features to function.
===

* XCENT info: http://www.xcent.com/downloads/default.asp?file=15