RegexParseOptions Class

Configures how RegexSyntaxTree parses a pattern.

public sealed class RegexParseOptions : IEquatable<RegexParseOptions>
Implements

Constructors

NameDescription
RegexParseOptions(RegexDialect)

RegexParseOptions(RegexDialect)

RegexParseOptions.cs
public RegexParseOptions(RegexDialect dialect)

Parameters

dialect RegexDialect

No documentation is available.

Properties

NameDescription
DialectThe dialect to parse the pattern as.
MaxRecursionDepthThe maximum number of nested groups and character classes the parser descends into before reporting REGEX0200 and treating the remaining text as skipped text. Guards against stack overflow on deeply nested input.
PatternOptionsThe options in effect at the start of the pattern, as if the caller had passed them to the engine. An inline construct such as (?x) changes them from that point on.

The dialect to parse the pattern as.

public RegexDialect Dialect { get; init; }

Property value

RegexDialect

MaxRecursionDepth

RegexParseOptions.cs

The maximum number of nested groups and character classes the parser descends into before reporting REGEX0200 and treating the remaining text as skipped text. Guards against stack overflow on deeply nested input.

public int MaxRecursionDepth { get; init; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is less than one.

PatternOptions

RegexParseOptions.cs

The options in effect at the start of the pattern, as if the caller had passed them to the engine. An inline construct such as (?x) changes them from that point on.

public RegexPatternOptions PatternOptions { get; init; }

Property value

RegexPatternOptions

Methods

NameDescription
Equals(RegexParseOptions?)
Equals(object?)
GetHashCode()
ToString()

Equals overloads

Equals(RegexParseOptions?)

public bool Equals(RegexParseOptions? other)
Parameters
other RegexParseOptions?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(RegexParseOptions?, RegexParseOptions?)
operator !=(RegexParseOptions?, RegexParseOptions?)

operator ==(RegexParseOptions?, RegexParseOptions?)

public static bool operator ==(RegexParseOptions? left, RegexParseOptions? right)

Parameters

left RegexParseOptions?
right RegexParseOptions?

Returns

bool

No documentation is available.

operator !=(RegexParseOptions?, RegexParseOptions?)

public static bool operator !=(RegexParseOptions? left, RegexParseOptions? right)

Parameters

left RegexParseOptions?
right RegexParseOptions?

Returns

bool

No documentation is available.

Constants

NameDescription
DefaultMaxRecursionDepthThe default value of RegexParseOptions.MaxRecursionDepth.

DefaultMaxRecursionDepth

public const int DefaultMaxRecursionDepth = 128