.NET Framework Regular Expressions
Regular expressions provide a powerful, flexible, and efficient method for processing text. The extensive pattern-matching notation of regular expressions allows you 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. For many applications that deal with strings (such as HTML processing, log file parsing, and HTTP header parsing), regular expressions are an indispensable tool.
Microsoft .NET Framework regular expressions incorporate the most popular features of other regular expression implementations such as those in Perl and awk. Designed to be compatible with Perl 5 regular expressions, .NET Framework regular expressions include features not yet seen in other implementations, such as right-to-left matching and on-the-fly compilation.
The .NET Framework regular expression classes are part of the base class library and can be used with any language or tool that targets the common language runtime, including ASP.NET and Visual Studio 2005.
In This Section
- Regular Expressions as a Language
Provides an overview of the programming language aspect of regular expressions.
- Regular Expression Language Elements
Provides information on the set of characters, operators, and constructs that you can use to define regular expressions.
- Regular Expression Classes
Provides information and code examples illustrating how to use the regular expression classes.
- Details of Regular Expression Behavior
Provides information about the capabilities and behavior of .NET Framework regular expressions.
- Regular Expression Examples
Provides code examples illustrating typical uses of regular expressions.
Provides class library reference information for the .NET Framework System.Text.RegularExpressions namespace.