Regex Tester
Test JavaScript regular expressions against sample text with live highlighting, capture groups, named groups and replacement preview.
What is the Regex Tester?
Regular expressions describe text patterns for searching, validating and replacing — for example Indian mobile numbers, PIN codes or GSTINs.
How does it work?
The pattern runs in a separate Web Worker with a time limit, so a runaway pattern cannot freeze your browser. Matches are highlighted and listed with their groups.
Example
[6-9]\d{9} matches 10-digit Indian mobile numbers that start with 6, 7, 8 or 9.
Frequently asked questions
Is my data sent to a server?
No. This tool runs entirely in your browser; nothing you paste is uploaded or stored.
Which regex flavour is used?
JavaScript (ECMAScript) regular expressions, as used in browsers and Node.js. Syntax differs slightly from PCRE, Python and Java.
Related tools
Enable JavaScript to use this calculator.