Regex Tester

FeaturedDeveloper Tools

Test and debug regular expressions with real-time match highlighting.

//g
Flags:
Match highlights appear here

What is Regex Tester?

A Regex Tester lets you write and test regular expressions against real text in real time, highlighting every match and showing capture groups. It supports all standard JavaScript regex flags — global, case-insensitive, multiline, dotAll, and unicode.

How to use Regex Tester

1

Enter your pattern

Type your regular expression between the slashes at the top. The tool highlights syntax errors as you type.

2

Set flags

Toggle flags like g (global), i (case-insensitive), or m (multiline) using the flag buttons below the pattern input.

3

Paste test text

Paste or type the string you want to match against in the Test String textarea.

4

Inspect matches

All matches are highlighted in the output panel. The Match Details section shows the exact position and any capture group values.

5

Use replace mode

Switch to Replace Mode to test substitutions. Enter a replacement string (supports $1 back-references) and see the result live.

Who uses Regex Tester?

Form validation

Frontend developers

Build and test regex patterns for validating email addresses, phone numbers, postal codes, and custom input formats before adding them to your code.

Log parsing

DevOps & SRE teams

Write patterns to extract timestamps, error codes, or IP addresses from server log files — and confirm they match the right lines.

Data transformation

Data engineers

Test search-and-replace patterns for bulk text manipulation in scripts, editors, and ETL pipelines.

Related Tools

FAQ

What regex flags are supported?+
All standard JavaScript regex flags are supported: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), and y (sticky).
Can I use capture groups?+
Yes. Named and numbered capture groups are both supported and displayed with their matched values in the results panel.
Does it support lookahead and lookbehind?+
Yes, all modern regex features including lookahead, lookbehind, and non-capturing groups are supported.

More Tools

View all