Regex Tester
Test regular expressions live with Indian format presets.
- #1
- 9876543210
A match only checks the format. It cannot prove that a PAN, GSTIN, IFSC or pincode exists.
About this tool
Regular expressions describe text patterns, and getting one right usually takes several tries. This tester lets you type a pattern and some sample text and see the matches straight away. It uses your browser's JavaScript regular expression engine, so what works here will work in JavaScript code. Enter flags such as g for all matches, i to ignore case and m so that ^ and $ match at each line. The g flag is added automatically if you leave it out so that all matches are listed. If the pattern is not valid, a clear error message appears instead of the page failing. Preset buttons load common Indian patterns such as mobile numbers, PAN, GST numbers, IFSC codes and pincodes. A pattern match only checks the format of a value; it cannot prove that a PAN, GST number or account really exists.
How to use it
- Type your regular expression in the pattern box.
- Set the flags, for example gm or gi.
- Paste the text you want to test against.
- Read the number of matches and the list of matches.
- Adjust the pattern until it matches exactly what you want.
How it works
The tool builds a RegExp from your pattern and flags and lists every match from the text. Common building blocks: \d is a digit, \w a word character, [A-Z] a capital letter, {n} exactly n repeats, + one or more, * zero or more, ^ the start and $ the end.
Example: The pattern ^[6-9]\d{9}$ with flags gm against the two lines 9876543210 and ABCDE1234F matches only the first line, because it is a ten-digit number starting with 6 to 9.
Common uses
- Building and checking a validation pattern for a form field.
- Finding all email-like or number-like strings in a block of text.
- Learning regular expressions by testing small examples.
Frequently asked questions
Which regex flavour does it use?
What do the flags mean?
Why does my pattern show an error?
Can a pattern prove a PAN or GST number is real?
Is my text sent anywhere?
Related tools
Last reviewed 2026-11-01. Browse all tools