🚩regex flag
🚧 under construction
Last updated
🚧 under construction
Last updated
JS ⟩ value ⟩ object ⟩ regex ⟩ flag
generate indices for substring matches.
treat a pattern as a sequence of Unicode .
g
global search.
i
ignore case.
m
allows ^
and $
to match newline.
s
allows .
to match newline.
y
"sticky" search: matches starting at the current position in the target string.
when using str.matchAll(regex), the regex
must have the global (g
) flag set, or a TypeError
is thrown