Module regex/flags

regex/flags

Regex flags parsing and representation.

Regex flags follow JavaScript syntax: "gi", "ms", "iu", etc.

Supported flags:

  • g — global: match all occurrences
  • i — ignoreCase: case-insensitive matching
  • m — multiline: ^ and $ match line boundaries
  • s — dotAll: . matches newline characters
  • u — unicode: full Unicode matching
  • y — sticky: match from lastIndex only

Types

RegexFlags struct
RegexFlags

Fields

NameTypeDescription
globalbool
ignore_casebool
multilinebool
dot_allbool
unicodebool
stickybool
impl(RegexFlags, ...)
default : (RegexFlags) fn() -> RegexFlags

Returns: RegexFlags

parse : (RegexFlags) fn(flags_str : String) -> Result(RegexFlags, String)

Parameters

NameTypeNotes
flags_strString

Returns: Result(RegexFlags, String)