Regex Tester

Type a pattern and test text — matches highlight live, groups listed below.

Frequently asked questions

Which regex flavor does this use?

JavaScript (ECMAScript) regex, as implemented by your browser. Most patterns behave identically to PCRE, but lookbehind support and some escapes can differ from Python or PHP flavors.

What do the flags mean?

g finds all matches instead of the first; i ignores case; m makes ^ and $ match at line breaks; s lets the dot match newlines; u enables full Unicode matching.

Why does my pattern say "invalid"?

The exact browser parser error is shown, most often an unescaped special character like ( ) [ ] or a dangling backslash. Escape literals with a backslash: \( matches a real parenthesis.