Regex Tester
Test JavaScript/Python-style regular expressions live.
Loading tool…
Processing happens on your device using your browser's CPU/GPU. Results are kept only in this tab's memory and are wiped when you click “Clear” or close the page.
About Regex Tester
Write a regular expression and watch it match your sample text live, with every match highlighted and listed with its position and capture groups. Preset patterns for email addresses, Indian mobile numbers, PAN, GSTIN, PIN codes, URLs, dates and IPv4 are one click away. Useful for developers, data cleaners and students learning regex. Everything runs in your browser, so test data stays on your device.
How to use Regex Tester
- Click a preset chip such as Email, PAN, GSTIN or Indian mobile, or type your own pattern.
- Set the flags, for example gi for a global case-insensitive search.
- Paste your sample text into the Test text box and watch matches highlight as you type.
- Check the match count and the table of index, match and capture groups below.
- Enter a replacement, using $1 for the first group, to preview a find and replace.
What people use it for
- Validating PAN, GSTIN or PIN code formats before an import into an accounting system
- Pulling every phone number or email out of a pasted block of text
- Testing a log-parsing pattern before putting it into a script or a grep command
- Learning what capture groups do by seeing each group filled in the match table
Good to know
The syntax is JavaScript's, which covers the same ground as Python's re module for common patterns, though named groups, lookbehind and Unicode property escapes differ and depend on your browser. The global flag is added automatically for highlighting. The match table shows the first 200 matches. A catastrophically backtracking pattern can freeze the tab.