Regex.IsValid Method
Definition
Namespace: Corvus.Ecma262.RegularExpressions
Assembly: Corvus.Regex.Ecma262.dll
Overloads
| Method | Description |
|---|---|
| IsValid(string, RegexFlags) | Whether a pattern is a valid ECMA-262 pattern in the grammar of the flags. |
| IsValid(string, RegexFlags, RegexEdition, RegexUnicodeVersion) | Whether a pattern is a valid ECMA-262 pattern in the grammar of the flags and the edition, under a version of Unicode. |
IsValid(string, RegexFlags)
Source: Regex.cs
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 |
IsValid(string, RegexFlags, RegexEdition, RegexUnicodeVersion)
Source: Regex.cs
Whether a pattern is a valid ECMA-262 pattern in the grammar of the flags and the edition, under a version of Unicode.
public static bool IsValid(string pattern, RegexFlags flags, RegexEdition edition, RegexUnicodeVersion unicodeVersion)
Parameters
| Name | Type | Description |
|---|---|---|
pattern |
string |
The pattern. |
flags |
RegexFlags |
The flags. |
edition |
RegexEdition |
The edition of ECMA-262 whose grammar the pattern is read with. |
unicodeVersion |
RegexUnicodeVersion |
The version of Unicode whose character database the pattern is read with. |
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