🚩regex flag
🚧 under construction
Last updated
Was this helpful?
🚧 under construction
Last updated
Was this helpful?
Was this helpful?
JS ⟩ value ⟩ object ⟩ regex ⟩ flag
/abc/igd // ignnore case, global search, generate indices
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❗