Regex.IsValid Method
Definition
Namespace: Corvus.Ecma262.RegularExpressions
Assembly: Corvus.Regex.Ecma262.dll
Source: Regex.cs
IsValid(string, RegexFlags)
Whether a pattern is a valid ECMA-262 pattern in the grammar of the flags.
public static bool IsValid(string pattern, RegexFlags flags)
Parameters
| Name | Type | Description |
|---|---|---|
pattern |
string |
The pattern. |
flags |
RegexFlags |
The flags. |
Returns
true when it is. A pattern over a limit of size is not reported as valid.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue