Regex Tester
Build and test regular expressions with live match highlighting
//g
20 matches
Common Presets
Test String
105 chars · 2 lines
Match Highlights
The quick brown fox jumps over the lazy dog. Contact us at hello@example.com or visit https://example.com
20 matches highlighted
Match Details
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | The | 0 | — |
| 2 | quick | 4 | — |
| 3 | brown | 10 | — |
| 4 | fox | 16 | — |
| 5 | jumps | 20 | — |
| 6 | over | 26 | — |
| 7 | the | 31 | — |
| 8 | lazy | 35 | — |
| 9 | dog | 40 | — |
| 10 | Contact | 45 | — |
| 11 | us | 53 | — |
| 12 | at | 56 | — |
| 13 | hello | 59 | — |
| 14 | example | 65 | — |
| 15 | com | 73 | — |
| 16 | or | 77 | — |
| 17 | visit | 80 | — |
| 18 | https | 86 | — |
| 19 | example | 94 | — |
| 20 | com | 102 | — |
Find & Replace
Use $1,
$2 for capture groups, or
$& for the full match.
Quick Reference
.Any character except newline
\dDigit [0-9]
\DNon-digit
\wWord character [a-zA-Z0-9_]
\WNon-word character
\sWhitespace
\SNon-whitespace
^Start of string/line
$End of string/line
*0 or more
+1 or more
?0 or 1 (optional)
{n}Exactly n times
{n,m}Between n and m times
()Capture group
(?:)Non-capture group
(?=)Positive lookahead
(?!)Negative lookahead
[abc]Character class
[^abc]Negated character class
a|bAlternation (a or b)
\bWord boundary