Regex tester
Test a regular expression with live match highlighting and groups.
Flags: gu
Cheat sheet
.- Any character except a newline
\d \w \s- Digit, word character, whitespace
\D \W \S- Not a digit, word character, whitespace
[abc] [^abc]- Any of, or none of, the characters
[a-z]- A character in the range
^ $- Start and end of the text, or line with m
\b- Word boundary
* + ?- Zero or more, one or more, optional
{2} {2,} {2,5}- Exactly, at least, between
*? +?- As few as possible
(abc)- Capture group
(?<name>abc)- Named capture group
(?:abc)- Group without capturing
a|b- Either a or b
(?=a) (?!a)- Followed by, not followed by
(?<=a) (?<!a)- Preceded by, not preceded by
\1 \k<name>- Same text as a group
\p{L}- A Unicode letter, needs u