Quick answer

JavaScript regex flags are: g (global), i (ignore case), m (multiline), s (dotall), u (unicode), y (sticky).

Regex Invalid Flags

JavaScript regex flags are: g (global), i (ignore case), m (multiline), s (dotall), u (unicode), y (sticky). Any other character or invalid combination can cause an error.

Common causes

How to fix

Examples

Bad

gi x

Good

gi

FAQ

What does the 'g' flag do?
Global: find all matches instead of stopping after the first.
What does the 's' flag do?
Dotall: . matches newlines as well.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical