// staticdata.dev — regexFlags
// Generated file. Do not edit by hand.
// SPDX-License-Identifier: MIT

export const regexFlags = [
  {
    "flag": "d",
    "name": "hasIndices",
    "description": "Generate indices for substring matches — adds a .indices array to each match result with start/end positions for the match and each capture group."
  },
  {
    "flag": "g",
    "name": "global",
    "description": "Find all matches rather than stopping after the first match. exec() and test() advance lastIndex after each match; match() and replace() return or replace every match."
  },
  {
    "flag": "i",
    "name": "ignoreCase",
    "description": "Perform case-insensitive matching. Letters in the pattern match both upper- and lower-case variants in the input string."
  },
  {
    "flag": "m",
    "name": "multiline",
    "description": "Treat ^ and $ as matching at the start and end of each line (lines are separated by the line terminators \\n, \\r, \\u2028 or \\u2029) rather than only at the start and end of the entire string."
  },
  {
    "flag": "s",
    "name": "dotAll",
    "description": "Allow the . metacharacter to match any character including newline characters (\\n, \\r, \\u2028, \\u2029). Without this flag, . does not match line terminators."
  },
  {
    "flag": "u",
    "name": "unicode",
    "description": "Enable full Unicode mode. Treats the pattern and string as sequences of Unicode code points, enables Unicode escapes (\\u{...}), and applies Unicode case folding for case-insensitive matching."
  },
  {
    "flag": "v",
    "name": "unicodeSets",
    "description": "Enable Unicode sets mode (supersedes u). Adds set notation and string properties in character classes ([...]), intersection ([A&&B]), subtraction ([A--B]), and improved Unicode handling. Cannot be combined with u."
  },
  {
    "flag": "y",
    "name": "sticky",
    "description": "Match only at the exact position indicated by lastIndex — do not advance through the string searching for a match. Effectively anchors the match at lastIndex."
  }
] as const;

export type RegexFlag = (typeof regexFlags)[number];
