Flags
Quick Presets

Results

0 Matches
0 Capture groups
0 Matched characters
— Pattern

Highlighted matches

Match details

Regular expression cheat sheet

^ $Start / end of the text (of each line with the m flag)
.Any character except a line break (including line breaks with s)
* + ?Zero or more, one or more, zero or one of the preceding item
{n} {n,m}Exactly n, or between n and m repetitions
[abc] [^abc]Any character in the set / not in the set
a|bEither a or b
\d \w \sDigit, word character (a–z, A–Z, 0–9, _), whitespace
\bWord boundary
( )Capturing group, numbered $1, $2, …
(?<name> )Named capturing group
(?: )Group without capturing
(?= ) (?! )Lookahead: followed by / not followed by

This tester uses your browser's JavaScript regular expression engine, so results match String.prototype.match and RegExp.exec. Without the g flag only the first match is shown. At most 1,000 matches are listed. Everything runs locally; your text is never uploaded.