+971 52 5040 139 ahmed@resopera.com

Res Opera Tools · IT Tools

Regex Tester

Write a regular expression, paste some text and see every match highlighted instantly. Inspect capture groups, preview a replacement, read a plain-English explanation and copy ready-made code.

✓ Free✓ Browser Based✓ No Data Upload✓ Unlimited Usage
/ /

How to use the Regex Tester

A regular expression (regex) is a pattern that describes text. Use it to find, check or replace parts of a text, such as emails, phone numbers or dates.

Steps

  1. Type your pattern between the two slashes, or click one of the Common patterns to start from an example.
  2. Turn flags on or off: g finds all matches, i ignores upper and lower case, m makes ^ and $ work on every line.
  3. Paste or type the text you want to test. Matches are highlighted as you type.
  4. Use the tabs to see the match list and groups, preview a replacement, read a plain-English explanation, or copy the code for JavaScript, Python or PHP.

Why test a regex first?

  • Catch mistakes before they reach your website, form or script.
  • See exactly what each part of a pattern matches.
  • Learn regex faster with the built-in explanation and quick reference.

Frequently asked questions

Which regex flavour does this tester use?

JavaScript (ECMAScript), the same engine your browser uses. Most patterns also work in Python and PHP, and the Code tab adjusts the syntax for them.

What do the flags mean?

g = find all matches, i = ignore case, m = multiline, s = dot matches line breaks, u = full Unicode support, y = sticky (match only at the current position).

Why does it say a pattern took too long?

Some patterns, especially ones with nested repeats such as (a+)+, can take extremely long on certain text (catastrophic backtracking). The test is stopped so your page does not freeze. Simplify the pattern and try again.

Is the text I paste uploaded?

No. Everything runs in your browser.

More free tools

100% client-side. Your patterns and text are processed inside your browser and never uploaded to our servers. Safe by design: if a pattern takes too long (catastrophic backtracking), the test is stopped instead of freezing your page.