Represents an immutable regular expression.
For a list of all members of this type, see Regex Members.
[Visual Basic] <Serializable> Public Class Regex Implements ISerializable [C#] [Serializable] public class Regex : ISerializable [C++] [Serializable] public __gc class Regex : public ISerializable [JScript] public Serializable class Regex implements ISerializable
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
The Regex class contains several static methods that allow you to use a regular expression without explicitly creating a Regex object. Using a static method is equivalent to constructing a Regex object, using it once and then destroying it.
The Regex class is immutable (read-only) and is inherently thread safe. Regex objects can be created on any thread and shared between threads. For more information, see Thread Safety.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: System (in System.dll)