Skip to content

Regex Tester

Test a regular expression against your own text with live match highlighting. Your text never leaves your browser.

Pattern

//

Common flags: g (global), i (case-insensitive), m (multiline), s (dot matches newline).

Tested locally, off the main thread. Your text never leaves your browser.

Enter a pattern and some text to see matches.

Matches (0)

Match details

Common questions

Does this use JavaScript regex syntax, or PCRE like PHP or Python?

JavaScript's own RegExp engine — the same one your browser or Node.js uses. Most common patterns work the same way in PCRE, but some PCRE-only features (like atomic groups or possessive quantifiers) aren't supported here, and a few JS-specific features (like named groups' exact syntax) may differ slightly from other languages.

Why does it show all matches even when I didn't add the global (g) flag?

The global flag is always applied internally so the tool can find and highlight every match in your text, regardless of which flags you typed. Your own flags (i, m, s, u, and so on) are still respected for how each match is found.

What happens if my pattern is slow or matches too many times?

Matching runs in a background worker with a timeout, so a catastrophically slow pattern (a ReDoS case) times out instead of freezing the page. Separately, matches are capped at 1,000 — if your pattern matches more than that in the given text, only the first 1,000 are shown.