Regex Tester
Test regular expressions instantly — live match highlighting, capture groups, and all standard flags.
Matched locally in your browser — nothing is sent to a server.
- #1
name=WebCodeInat index 0Groups: $1="name", $2="WebCodeIn" - #2
version=1at index 15Groups: $1="version", $2="1" - #3
tool=regexat index 29Groups: $1="tool", $2="regex"
About this tool
Enter a pattern and a test string to see every match highlighted live, along with each match’s index, full text, and numbered or named capture groups. Toggle the standard g/i/m/s/u flags to see exactly how they change what matches, or click one of the preset buttons (email, URL, IPv4 address, and more) to load a ready-made pattern and a demo string in one click.
Frequently asked questions
- Which regex flavor does this use?
- JavaScript's native RegExp engine — the same one your browser and Node.js use. If you're testing a pattern meant for another language (PCRE, Python's re, etc.), behavior can differ slightly, especially around lookbehind support, Unicode property escapes, and named-group syntax.
- What do the g/i/m/s/u flags mean?
- g (global) finds every match instead of just the first; i ignores case; m makes ^ and $ match at line breaks, not just the start/end of the whole string; s (dotAll) makes . also match newlines; u enables Unicode mode, needed for Unicode property escapes like \p{Letter} and correct handling of characters outside the Basic Multilingual Plane.
- Is my text sent to your servers?
- No. Every match is computed in your browser. Nothing you paste, upload, or generate here is sent to WebCodeIn's servers, logged, or stored.
- What are the preset buttons?
- Each preset (Email address, URL, UK postcode, US phone number, IPv4 address, Date, Hex color code, Username, Strong password, Whitespace) loads a ready-made, standard pattern along with a short demo string so you can see it match immediately — a starting point to adapt, not a guarantee it covers every edge case of that format.
- Can a pattern make this tool hang?
- A pathologically backtracking pattern ("catastrophic backtracking") against a long input can be slow — that's a property of the regex engine itself, the same as it would be in any browser or Node.js script running that pattern, not something this tool can detect ahead of time. Separately, the match list is capped at 1,000 results so a pattern that matches at nearly every position in a large input can't hang the page rendering an unbounded list.
Privacy
Every match is computed in your browser using JavaScript’s native regular expression engine. No pattern, text, or match result is sent to WebCodeIn’s servers, logged, or stored.