public record BalancedGroup.MatchOptions
Options controlling balanced-group matching.
Instances are immutable; use the with* methods to derive variants.
ignoreRegex - regex for spans to skip while scanning (e.g. string literals
or escape sequences); null or blank means ignore nothing.
This is the practical counterpart to writing “neither open nor
close” character classes in a hand-built .NET balancing pattern.includeEdges - true to keep opening/closing delimiters in
BalancedGroup.getMatchedString; false to strip
them (like .NET's balancing capture of the interval between
the subtracted open capture and the close match)| Type Params | Return Type | Name and description |
|---|---|---|
|
public static BalancedGroup.MatchOptions |
defaults()Default options: nothing ignored, delimiters included. |
|
public BalancedGroup.MatchOptions |
withIgnoreRegex(String ignoreRegex)Returns a copy with the given ignore regex. |
|
public BalancedGroup.MatchOptions |
withIncludeEdges(boolean includeEdges)Returns a copy with the given edge-inclusion policy. |
Default options: nothing ignored, delimiters included.
Returns a copy with the given ignore regex.
ignoreRegex - regex of content to skip, or null/blank for noneReturns a copy with the given edge-inclusion policy.
includeEdges - whether matched text keeps opening/closing delimiters