Regex Tester

Developer toolNew

Test regular expressions against sample text with live matches.

This tool runs entirely in your browser. Your files never leave your device — nothing is uploaded.

Pattern

JavaScript regex syntax — no surrounding slashes needed.
Any combination of g i m s u y.

Matches

Enter a pattern and some test text to see matches here.

Step-by-step guideHow to Test a Regular Expression (Regex)

Frequently asked questions

Is my pattern and test text uploaded to a server?
No. The Regex Tester runs entirely in your browser using JavaScript's built-in RegExp engine. Your pattern, flags, and test string never leave your device, so it's safe to paste private logs, tokens, or sensitive data.
Which regex flags are supported?
Any combination of the standard JavaScript flags: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), and y (sticky). The flags field defaults to g so all matches are collected at once. Named capture groups like (?<year>\d{4}) are also supported and shown in the results.
Why do I get an "Invalid regular expression" error?
That message appears when the pattern or flags can't be compiled — for example an unbalanced bracket, a dangling backslash, or an unknown flag letter. The tool surfaces the exact reason from the browser's engine so you can fix the syntax. Once the pattern is valid, matches update automatically as you type.