gossamer/regexp_flag

Types

Flags that modify how a RegExp matches.

Unicode and UnicodeSets are mutually exclusive — passing both to regexp.new_with returns an error.

pub type RegExpFlag {
  Global
  IgnoreCase
  Multiline
  DotAll
  Unicode
  UnicodeSets
  Sticky
  HasIndices
}

Constructors

  • Global

    g — find all matches, not just the first.

  • IgnoreCase

    i — case-insensitive matching.

  • Multiline

    m^ and $ match line boundaries, not just string ends.

  • DotAll

    s. matches newlines.

  • Unicode

    u — treat the pattern as Unicode code points.

  • UnicodeSets

    v — extended Unicode set features (supersedes u).

  • Sticky

    y — match starting at last_index, no skipping.

  • HasIndices

    d — include match indices in Match results.

Search Document