Regex Tester
100% FreeLive regex testing with highlighted matches, capture groups, named groups, and JS-engine flag toggles (i/m/s/u/y).
Email me at alice@example.com or bob@test.io
Embed This Tool
Easy to EmbedAdd Regex Tester to your website or blog in seconds.
- Responsive design
- Lightweight & fast
- No backend required
- Always up-to-date
<iframe
src="https://tools.town/embed/regex-tester/"
width="100%"
height="600"
style="border:none; border-radius:12px;"
loading="lazy"
title="Regex Tester">
</iframe> Advertisement
How to Use
- 1 Type your regex pattern (without surrounding slashes)
- 2 Toggle flags as needed: i, m, s, u, y
- 3 Type or paste test text
- 4 Matches highlight in yellow, with capture groups listed below
Features
- Live highlighting of all matches
- Capture groups numbered ($1, $2, …)
- Named groups (?<name>…) shown separately
- All 5 user-toggleable JS flags
- Always uses 'g' globally — find every match
- Parse errors surface with the engine's exact message
Why it Matters
Regex is the universal text-processing tool but writing one by trial and error is slow. A live tester with highlighted matches and group breakdowns turns a 30-minute debug into 30 seconds — easier than firing up a Node REPL or a regex testing site that requires an account.
Use Cases
Build a Validator
Iterate on a regex for email/phone/URL validation
Log Scraping
Test a pattern against a sample log line before deploying
Learning Regex
See exactly what each part of your pattern matches
Frequently Asked Questions
Which regex flavour does this use?
Why is the 'g' flag forced on?
What does the 'y' (sticky) flag do?
Related Tools You Might Like
Cron Expression Parser
Translate 5-field POSIX cron expressions into plain English with field breakdown and the next 5 scheduled runs.
CSS Minifier
Compress CSS using Yandex's csso engine — removes whitespace, comments, merges rules, dedupes selectors, compresses colors.
JSON Formatter
Beautify, minify, and sort-key JSON in real time. Surfaces parse errors with line + column. 100% client-side.
JSON Validator
Validate JSON in real time with structural diagnostics — node count, max depth, type counts, and precise parse-error location.
Find and Replace
Find and replace across a block of text — plain or full regex with back-references, case toggle, multiline mode.