Home › Developer Tools › Regex Tester

Regex Tester (JavaScript)

Test regular expressions live. See matches highlighted, capture groups, and a replace preview. Runs with a time limit.

How to use Regex Tester

Step by step

1

Type a pattern

Enter the regular expression without slashes, then choose flags.

2

Paste test text

Matches are highlighted as you type.

3

Check groups and replace

See capture groups and preview a replacement.

Features and benefits

What you get

Live highlighting

Matches are marked in your text as you type.

Capture groups

Numbered and named groups are listed for each match.

Time limit

Slow patterns are stopped after 2 seconds.

Private

Runs entirely in your browser.

Supported formats and limitations

What to expect

Supported formats

JavaScript regular expressions

Size limits

Limited by browser memory

Limitations

Uses the JavaScript regex engine. Other languages (PCRE, Python, .NET) have small differences. Shows up to 1,000 matches.

Frequently asked questions

Quick answers

Which regex flavour is used?

JavaScript (ECMAScript), the same as the RegExp object in your browser.

Why is my pattern stopped?

Some patterns, for example nested repeats like (a+)+, can take exponential time. The tester stops them after 2 seconds.

Related tools

More from Developer Tools

Related guides

Read more about this tool