How to use the regex tester
- Type your pattern between the slashes — no need to escape the slashes themselves.
- Toggle flags:
gall matches,iignore case,m^ and $ per line,sdot matches newlines,uUnicode,ysticky. - Paste test text. Matches highlight instantly; the table lists each match, its position and its groups.
- Open Replace to preview
String.replacewith$1,$<name>and$&.
Which regex flavour is this?
JavaScript (ECMAScript 2024), exactly what new RegExp() does in your browser and in Node.js. It supports lookbehind, named groups and Unicode property escapes like \p{L}. PCRE (PHP), Python and Java are very similar for everyday patterns; the differences are mostly in advanced features such as possessive quantifiers, atomic groups and inline flags, which JavaScript lacks.
Explain and generate with AI
The token breakdown is computed instantly on the page. For a fuller, contextual explanation — or to describe what you want in words and get a pattern — use the AI buttons. The result is loaded into the tester so you can verify it against real text before you trust it.