Regular Expressions

The comparison and manipulation features provided by the String and String-Builder classes are adequate for simple operations. However, when complex string manipulations are required or large amounts of text need to be processed, regular expressions can provide a more efficient solution. Although regular expressions are new to Java version 1.4, many third-party Java regular expression libraries have been available for some time. .NET includes regular expression functionality as part of the standard class libraries in the System.Text.RegularExpressions namespace.

The .NET regular expression implementation is refreshingly straightforward and contains some functionality not available in the Java implementation. In the following ...

Get C# for Java Developers 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.