Regex tester

Enter a pattern and a test string to see every match highlighted. The pattern runs on your device with a time limit.

Regex tester runs entirely in your browser: the text you paste is never sent to a server. It is free and needs no sign-up.

How to use it

  1. Type the pattern Type the pattern without slashes. The tester uses JavaScript syntax, which differs from Python, PCRE, and C# in some details. Choose the flags you need.
  2. Paste the test text Paste the text to search in the Test string box. Every match is highlighted and listed with its position, its capture groups, and any named groups.
  3. Preview the replacement Type a replacement to see the result. Use $1 for the first group,
lt;name> for a named group, and amp; for the whole match. The test text itself is not changed.

Questions

Why does the tool say the pattern took too long?

Matching runs in a background thread with a time limit of 1 second. Patterns with nested repeats, such as (a+)+$ on a long run of letters, can take far longer, so the run is stopped. Simplify the pattern and try again.

Does the tester send my text to a server?

No. Matching runs in your browser, and nothing you type is uploaded. Test strings are limited to 1 MB, so split a larger text into smaller pieces.