Regex Constructors
Definition
Namespace: Corvus.Ecma262.RegularExpressions
Assembly: Corvus.Regex.Ecma262.dll
Overloads
| Constructor |
Description |
| Regex(string) |
Initializes a new instance of the Regex class with no flags. |
| Regex(string, RegexFlags) |
Initializes a new instance of the Regex class. |
| Regex(string, string) |
Initializes a new instance of the Regex class, with the flags as new RegExp(pattern, flags) takes them. |
| Regex(string, RegexFlags, TimeSpan) |
Initializes a new instance of the Regex class with a match timeout. |
| Regex(string, RegexFlags, TimeSpan, GeneratedRunner?, GeneratedRunner?) |
Initializes a new instance of the Regex class whose programs run as the generated code given rather than the interpreter: the seam for the sou... |
Regex(string)
Source: Regex.cs
Initializes a new instance of the Regex class with no flags.
public Regex(string pattern)
Parameters
| Name |
Type |
Description |
pattern |
string |
The pattern. |
Exceptions
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
Regex(string, RegexFlags)
Source: Regex.cs
Initializes a new instance of the Regex class.
public Regex(string pattern, RegexFlags flags)
Parameters
Exceptions
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
Regex(string, string)
Source: Regex.cs
Initializes a new instance of the Regex class, with the flags as new RegExp(pattern, flags) takes them.
public Regex(string pattern, string flags)
Parameters
| Name |
Type |
Description |
pattern |
string |
The pattern. |
flags |
string |
The flags: any of d, g, i, m, s, u, v and y, each at most once. |
Exceptions
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
Regex(string, RegexFlags, TimeSpan)
Source: Regex.cs
Initializes a new instance of the Regex class with a match timeout.
public Regex(string pattern, RegexFlags flags, TimeSpan matchTimeout)
Parameters
Exceptions
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |
Regex(string, RegexFlags, TimeSpan, GeneratedRunner?, GeneratedRunner?)
Source: Regex.cs
Initializes a new instance of the Regex class whose programs run as the generated code given rather than the interpreter: the seam for the source generator, not for use by hand.
public Regex(string pattern, RegexFlags flags, TimeSpan matchTimeout, GeneratedRunner? bounds, GeneratedRunner? captures)
Parameters
| Name |
Type |
Description |
pattern |
string |
The pattern. |
flags |
RegexFlags |
The flags. |
matchTimeout |
TimeSpan |
The limit of time on a match. |
bounds |
GeneratedRunner? |
The generated code for the program that finds a match's bounds, or null. |
captures |
GeneratedRunner? |
The generated code for the program that tracks every group, or null. |
Applies To
| Product |
Versions |
| .NET |
9, 10 |
| .NET Standard |
2.0, 2.1 |