Using Regular Expressions

The .NET Framework provides rich regular expression support and functionality within the base class library. Previously, regular expressions were only supported via third-party libraries for languages such as C++ and Visual Basic. In .NET, the regular expression syntax is fully supported and there are a number of classes in the System.Text.RegularExpressions namespace geared to leveraging this powerful string processing language.

Understanding Expression Syntax

The hardest part of using regular expressions in .NET is to first gain an understanding of the language. Unlike C#, the syntax for regular expressions is somewhat cryptic and takes time and practice to understand and apply it correctly.

The language itself is ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.