RegEx Tester

Test regular expressions with live match highlighting, capture groups, and named groups. Type a pattern and test string — results update as you type.

Characters
. any character
\d digit [0-9]
\w word char [a-zA-Z0-9_]
\s whitespace
\b word boundary
[abc] character class
[^abc] negated class
Quantifiers
* 0 or more
+ 1 or more
? 0 or 1 (optional)
{3} exactly 3
{2,5} between 2 and 5
*? lazy (non-greedy)
Groups & Anchors
(abc) capture group
(?:abc) non-capturing
(?<name>abc) named group
a|b alternation (or)
^ start of string
$ end of string
Lookaround
(?=abc) lookahead
(?!abc) neg. lookahead
(?<=abc) lookbehind
(?<!abc) neg. lookbehind
curl -X POST -d 'pattern=(\w%2B)&flags=g&test=hello+world' swissarmydev.tools/regex