Free Regular Expression Tester
Test and debug regular expressions with real-time matching and highlighting.
Results
0
Matches
0
Capture groups
0
Matched characters
—
Pattern
The g (global) flag is off, so only the first match is shown.
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|b | Either a or b |
\d \w \s | Digit, word character (a–z, A–Z, 0–9, _), whitespace |
\b | Word 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.