Regex Tester Free

Type a pattern and some test text. Matches are highlighted live, every capture group is listed, and a replace box previews substitutions before you put the regex in your code.

🔎 Pattern

//gi
Presets:
Write to sales@pyalm.com or support+uae@example.co.ae today.
Type a replacement to preview it

🧩 Match details

#IndexMatch
19sales@pyalm.com
228support+uae@example.co.ae
Regex cheat sheet
.Any character except newline
\d \w \sDigit · word char · whitespace
\D \W \SNot digit · not word · not space
[abc] [^abc]Any of · none of
a* a+ a?0+ · 1+ · 0 or 1
a{3} a{2,5}Exactly 3 · between 2 and 5
a+?Lazy (as few as possible)
^ $Start · end of line/string
\bWord boundary
(abc)Capture group
(?<name>abc)Named group
(?:abc)Non-capturing group
a|ba or b
(?=a) (?!a)Lookahead · negative lookahead
(?<=a) (?<!a)Lookbehind · negative lookbehind
Built by Pyalm

Pyalm builds custom software, APIs and integrations for businesses in India and the UAE. We made these developer tools for our own team — use them free, and talk to us when you need something built.

Pyalm serviceCustom softwareInternal tools, portals and business systems built around how your team actually works — not the other way round.See custom software Pyalm serviceAI implementationPractical AI assistants, document processing and agents connected to your data — scoped, measured and production-ready.See AI implementation

See exactly what your pattern matches

Regular expressions are compact and easy to get subtly wrong. Highlighting every match in your sample text — with each capture group broken out underneath — shows immediately whether the pattern is too greedy, misses an edge case or matches across lines it shouldn't.

JavaScript flavour, all flags

The tester uses your browser's own RegExp engine, so behaviour matches JavaScript and TypeScript exactly: g, i, m, s, u, y and d flags, lookbehind, named groups and Unicode property escapes all work as they will in production.

Related

More free tools you might need

🧾

JSON Formatter & ValidatorFree

Format, validate, minify and syntax-highlight JSON — with exact error line and column.

🔗

URL Encoder / DecoderFree

Percent-encode or decode URLs and query strings, and break a URL into its parts.

🗜️

Code Minifier & BeautifierFree

Minify or beautify JavaScript, CSS, HTML and JSON — see the size you saved.

Browse all free tools

FAQ

Frequently asked questions

Which regex flavour does this use?

JavaScript (ECMAScript). Most syntax is shared with PCRE, Python and Java, but a few features differ — for example possessive quantifiers and atomic groups are not supported in JavaScript.

Why does my pattern only find one match?

Without the g (global) flag a regex stops after the first match. Turn on g to find every match in the text.

How do I reference a group in the replacement?

Use $1, $2 … for numbered groups, $<name> for named groups, and $& for the whole match. Use $$ for a literal dollar sign.

Can a regex freeze the page?

Badly nested quantifiers like (a+)+ can backtrack catastrophically on some inputs. The tester caps the number of matches it shows, but if the page pauses, simplify the pattern — the same regex would be slow in production too.

Need a tool built for your own workflow?

Pyalm builds custom software, APIs and integrations for businesses in India and the UAE. We made these developer tools for our own team — use them free, and talk to us when you need something built.

See custom software