RelicRELIC

Regex Tester

Write a regular expression, pick your flags, and watch every match light up in your text as you type.

Runs entirely in your browser. Nothing you type is uploaded.
//
2 matches
Test text
Highlighted
Reach us at hi@relic.space or sales@relic.space anytime.
Matches
at 12hi@relic.space
at 30sales@relic.space

Build the pattern, then trust the matches

This tester uses the exact regular expression engine your browser ships with, so what matches here matches in your JavaScript too. Type a pattern, toggle flags like g for global or i for case-insensitive, and every hit lights up in your text with its position and capture groups listed below. An invalid pattern shows a friendly error instead of failing silently.

That one regex you always rewrite from scratch

Everyone has a few patterns they reinvent every month because they never saved the last one. Relic is an encrypted, permanent memory for everything you copy, so the regex you finally got right stays searchable on every device, forever, end-to-end encrypted so only you can read it. Test it here for free, then keep it for good.

Frequently asked questions

How do I test a regular expression?

Type your pattern between the slashes, toggle the flags you want, and paste your test text. Every match lights up in the text, with its position and any capture groups listed below. It updates live as you edit either the pattern or the text.

Which regex flags does this support?

The standard JavaScript flags: g (global, find all matches), i (ignore case), m (multiline, so ^ and $ match line starts and ends), s (dotall, so . matches newlines), u (unicode), and y (sticky). Toggle them with the chips or type them directly.

Will these results match my code?

If your code is JavaScript or TypeScript, yes: this tester uses the exact RegExp engine your browser ships, so a pattern that matches here matches in your JS. Other languages (Python, PCRE, Go) share most syntax but differ on edge cases like lookbehind and named groups, so double check those.

How do capture groups show up?

Each match lists its captured groups as $1, $2, and so on, in order. Wrap part of your pattern in parentheses to capture it. That is how you pull a specific piece (like the domain out of an email) rather than just the whole match.

Is my test text uploaded anywhere?

No. The pattern runs against your text entirely in your browser, so log lines, sample data, or anything sensitive you are matching against never leaves your device.

More free tools
JSON Formatter
json formatter
Base64 Encode / Decode
base64 decode
Diff Checker
diff checker
URL Encode / Decode
url decoder
UUID Generator
uuid generator
Epoch Converter
epoch converter
All tools