Home›Developer Tools›Regex Tester Online

Regex Tester

See matches and groups as you type — with ready-made patterns for PAN, mobile, GSTIN and more.

Also searched as: regular expression tester · regex examples · javascript regex

Quick patternsRegex
Indian mobile number\b[6-9]\d{9}\b
PAN\b[A-Z]{5}[0-9]{4}[A-Z]\b
Aadhaar (12 digits)\b[2-9]\d{3}\s?\d{4}\s?\d{4}\b
PIN code\b[1-9]\d{5}\b
IFSC\b[A-Z]{4}0[A-Z0-9]{6}\b
GSTIN\b\d{2}[A-Z]{5}\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]\b
Email[\w.+-]+@[\w-]+\.[\w.]+
Vehicle number\b[A-Z]{2}\s?\d{1,2}\s?[A-Z]{1,3}\s?\d{4}\b

Test a regular expression live

Type a pattern and flags (g all matches, i ignore case, m multiline, s dot matches newline) and see every match highlighted in the text with its capture groups and position. The engine is JavaScript's own, so results match what you get in Node, browsers, Google Sheets' REGEXMATCH and most editors.

Cheat sheet

\d \w \sdigit, word character, whitespace (capitals negate)
. ^ $any character, start, end
* + ? {n,m}0+, 1+, 0–1, between n and m
[abc] [^abc] [a-z]sets and ranges
(x) (?:x) (?<name>x)capture, non-capture, named group
a|b \balternation, word boundary
(?=x) (?!x)lookahead, negative lookahead

Frequently asked questions

Why does it only find the first match?

Add the g flag to find all matches.

How do I match a literal dot or bracket?

Escape it with a backslash: \. \( \[ \?

Is the text sent anywhere?

No — matching runs in your browser.

More free tools

JSON Formatter & ValidatorBeautify, minify and validate JSONDeveloper ToolsXML FormatterPretty-print and validate XMLDeveloper ToolsBase64 Encode / DecodeText ↔ Base64, UTF-8 safeDeveloper ToolsURL Encode / DecodePercent-encode or decode any URL or query stringDeveloper ToolsHEX to RGB ConverterHEX ↔ RGB ↔ HSL with a live colour previewDeveloper ToolsWord to HTML ConverterPaste from Word or Docs, get clean HTMLDeveloper Tools