Regex Tester
Build and debug regular expressions live, with highlighted matches and capture groups.
Frequently asked questions
Is my regex or test text sent to a server?
No. Everything runs entirely in your browser using JavaScript's built-in RegExp engine. Your pattern and test string are never uploaded anywhere, and the tool keeps working offline once the page has loaded.
What do the flags g, i, m, s, u and y mean?
g (global) finds every match instead of only the first. i (ignore case) makes the match case-insensitive. m (multiline) lets ^ and $ match at line breaks. s (dotAll) lets the dot match newline characters. u (unicode) enables full Unicode and code-point handling. y (sticky) anchors each match to the current position. This tool uses exactly the same flags as the RegExp constructor in JavaScript.
Why does my pattern show "Invalid regex"?
The pattern could not be compiled by the RegExp engine, so it threw a SyntaxError. Common causes are an unclosed group or character class, a stray backslash, or a quantifier with nothing to repeat. The tool catches the error and shows its message inline instead of crashing, so you can fix the pattern and see results update live.