Skip to content
Text Utilities

Regex Tester Tool

Test regular expressions live. See every match highlighted, check groups and replace text. Ready patterns for email, mobile, PIN, PAN and GSTIN.

/ /

Matches shown in the text Testing

Try a ready pattern


                    
                

Match details

#MatchAtGroups
No matches yet.

This uses the JavaScript regex engine of your browser. Everything runs on your device. A slow pattern is stopped after 1.5 seconds.

Something not working? Report a problem

What is the Regex Tester Tool?

A regular expression (regex) is a short code that finds patterns in text. This tester shows every match highlighted as you type, so you can see at once if your pattern is right.

Use the flag buttons, check each match and its groups, and try a replace. A list of ready patterns for Indian formats like mobile numbers, PIN codes, PAN and GSTIN gets you started. It runs the regex engine of your browser, so it matches how JavaScript works.

How to use it

  1. Type your pattern in the top box.
  2. Paste the text you want to test in the text box.
  3. Watch the matches light up, and open the table to see each group.

Why people like this tool

Live highlight

Matches light up as you type.

Groups and positions

See each group and where it starts.

Replace preview

Try a replace before you use it.

Ready patterns

Email, mobile, PIN, PAN and GSTIN.

How it works, in one picture

Infographic: how to use the Regex Tester Tool in 3 easy steps: Add your text, Paste it here and See your result. You get: Live highlight, Groups and positions, Replace preview and Ready patterns.

Frequently asked questions

Which regex flavour does it use?
The JavaScript regex engine in your browser, so it matches what you get in JavaScript and TypeScript code.
What do the flags mean?
g finds all matches, i ignores big and small letters, m makes ^ and $ work on each line, s lets the dot match a new line, and u turns on full Unicode.
Why was my pattern stopped?
A pattern that repeats itself too much can freeze a page. We stop any test that runs longer than 1.5 seconds. Try making the pattern simpler.
Is my text sent anywhere?
No. Everything is tested inside your browser.

You may also like