Export (0) Print
Expand All
1 out of 9 rated this helpful - Rate this topic

Regex Class

Represents an immutable regular expression.

For a list of all members of this type, see Regex Members.

System.Object
   System.Text.RegularExpressions.Regex

[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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

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.

Requirements

Namespace: System.Text.RegularExpressions

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)

See Also

Regex Members | System.Text.RegularExpressions Namespace | .NET Framework Regular Expressions | Regular Expression Language Elements

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.