RegexLab

Live regex tester · matches, groups, replace

Pattern

/ /
0matches
0groups
0ms

Test text

Highlighted preview — every match found by your pattern is marked.

Match details

Replace

Saved patterns

Cheat sheet

.any character except newline
\d \w \sdigit · word char · whitespace
[abc] [^abc]character set · negated set
* + ?0+ · 1+ · optional
{2,5}between 2 and 5 times
^ $start · end of line
( ) (?: )capture · non-capturing group
(?<n>…)named capture group
a|balternation
(?=…) (?!…)lookahead · negative lookahead