Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Initializes a new instance of the Regex class for the specified regular expression, with options that modify the pattern.
Namespace: System.Text.RegularExpressions
Assembly: System.Text.RegularExpressions (in System.Text.RegularExpressions.dll)
Syntax
'Declaration
Public Sub New ( _
pattern As String, _
matchFlags As RegexOptions _
)
public Regex(
string pattern,
RegexOptions matchFlags
)
public:
Regex(
String^ pattern,
RegexOptions matchFlags
)
new :
pattern:string *
matchFlags:RegexOptions -> Regex
public function Regex(
pattern : String,
matchFlags : RegexOptions
)
Parameters
- pattern
Type: System. . :: . .String
The regular expression pattern to match.
- matchFlags
Type: System.Text.RegularExpressions. . :: . .RegexOptions
A bitwise combination of the enumeration values that modify the regular expression.
Remarks
The pattern parameter consists of regular expression language elements that symbolically describe the string to match.
A Regex object is immutable, which means that it can be used only for the match parameters you define when you create it. However, it can be used any number of times without being recompiled.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.