3 chars · 1 line
8 chars · 1 line
3 chars · 1 line
8 chars · 1 line
Regex flag error
Regex flavors do not share one universal flag set. This JavaScript tester accepts d, g, i, m, s, u, v, and y; an unrelated flag such as q is rejected before the pattern runs. This tool is free to use. No account or payment is required.
Last updated
A pattern copied from PCRE, Python, .NET, an editor, or another tool may include mode syntax that JavaScript expresses differently. Validate the flags separately from the pattern when porting a regex.
Remove q when the pattern does not require a JavaScript equivalent.
qCommon questions
It accepts d, g, i, m, s, u, v, and y and rejects duplicates.
Different regex flavors support different flags and syntax. Translate flavor-specific options before compiling with JavaScript RegExp.
Yes. A JavaScript regex can compile with no flags.
Debugging a specific Regex issue? Browse Regex troubleshooting.