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. A token-by-token reading of your pattern. Your pattern, ready to paste into code. Flags that other languages do not share are skipped and noted. 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. 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. 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). 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. No. Everything runs in your browser.Regex Tester
# Match Index Groups How to use the Regex Tester
Steps
Why test a regex first?
Frequently asked questions
Which regex flavour does this tester use?
What do the flags mean?
Why does it say a pattern took too long?
Is the text I paste uploaded?
More free tools
✓ Free✓ Browser Based✓ No Data Upload✓ Unlimited Usage
/
/
Result
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.