Regular Expression

//g
Flags:2 matches
Test String
Highlighted Matches
Hello, my name is Rohan Sharma. You can reach me at rohan.sharma@example.com
or at my backup account test+1@company.co.in.

My mobile number is 9876543210 and alternate is 8123456789.
Our office PIN code is 400001 and branch PIN is 110092.
Visit us at https://www.indiabusinesstools.com for more info.
My PAN is ABCDE1234F and GST hex colour code is #FF6200.
Match Details2 found
#1 @ 1449876543210
#2 @ 1728123456789

What is a Regex Tester?

A Regex Tester lets you write and test regular expressions against sample text with live match highlighting. It supports all standard JavaScript regex flags (global, case-insensitive, multiline, dotAll) and includes common Indian patterns like PAN, Aadhaar, mobile numbers, and GST numbers.

How to Use It

  1. 1Enter your regular expression in the pattern field (without slashes)
  2. 2Select flags: g (global), i (ignore case), m (multiline), s (dotAll)
  3. 3Type or paste your test text below
  4. 4All matches are highlighted in real time with count and captured groups shown

Example

Pattern: ^[6-9]\d{9}$ with the test string '9876543210' → matches (valid Indian mobile number). Pattern: [A-Z]{5}[0-9]{4}[A-Z] with 'ABCDE1234F' → matches (valid PAN format).

Why Use It

  • Test and debug regex patterns without running code
  • Validate Indian-specific formats: PAN, GST number, Aadhaar, PIN codes, mobile numbers
  • Learn regex visually by seeing which parts of text match in real time
  • Build input validation patterns for web forms and APIs

Frequently Asked Questions