Regular Expression
Flags:
Common patterns:
Test String
Match Highlighting
Matches & Capture Groups
What This Tool Does
Test regular expressions against any string with live match highlighting. Matches are highlighted in yellow in the test string panel. All capture groups are listed below with their match values. Eight common pattern presets (email, URL, IP, phone, date, hex color, HTML tag, integer) are available as quick-select chips.
Frequently Asked Questions
What regex flavour does this tool use?
This tester uses JavaScript's built-in RegExp engine. JavaScript regex is compatible with most modern regex patterns but has some differences from PCRE (used in PHP, Python) — notably it does not support lookbehind in older engines, possessive quantifiers, or atomic groups. Most common patterns work identically.
What do the flags do?
g (global) finds all matches instead of stopping at the first. i (case-insensitive) makes the match ignore letter case. m (multiline) makes ^ and $ match line boundaries instead of string boundaries. s (dotAll) makes . match newlines. u (unicode) enables Unicode mode.
What is a capture group?
Parentheses () create a capture group — the matched text inside them is captured separately. For example /(\d+)-(\w+)/ on "42-hello" captures "42" as group 1 and "hello" as group 2. Named groups use (?<name>...) syntax.
Is my data sent to a server?
No. All regex evaluation runs in your browser using JavaScript. Nothing is transmitted anywhere.