Package: groovy.util.regex

## [Java] Record BalancedGroup.MatchOptions

- groovy.util.regex.BalancedGroup.MatchOptions

-     public record BalancedGroup.MatchOptions

  Options controlling balanced-group matching.

  Instances are immutable; use the `with*` methods to derive variants.

  Parameters:
    `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)
  Since:
    6.0.0

- - ### Methods Summary

    Methods
    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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public static BalancedGroup.MatchOptions defaults()

      Default options: nothing ignored, delimiters included.

      Returns:
        the default options

    - #### public BalancedGroup.MatchOptions withIgnoreRegex(String ignoreRegex)

      Returns a copy with the given ignore regex.

      Parameters:
        `ignoreRegex` - regex of content to skip, or `null`/blank for none
      Returns:
        a new options instance

    - #### public BalancedGroup.MatchOptions withIncludeEdges(boolean includeEdges)

      Returns a copy with the given edge-inclusion policy.

      Parameters:
        `includeEdges` - whether matched text keeps opening/closing delimiters
      Returns:
        a new options instance