Regex Tester
Test JavaScript regular expressions with live matches, capture groups and replacement previews.
Your text stays in your browser. Nothing is uploaded.
Matches
Capture groups
Replacement preview
How regular expressions work
A regular expression describes a text pattern. Flags change matching behaviour: g finds every match, i ignores case, m changes line anchors, and s lets a dot include newlines.
Common mistakes
- Escape literal dots as
\.. - Use lazy quantifiers such as
.*?when greedy matching consumes too much. - Add
gwhen you need every match rather than only the first.
FAQ
Which regex engine is used?
Your browser's JavaScript RegExp engine.