🔍 Advanced Regex Tester
JavaScript (ECMAScript) syntax. 100% browser-based with safe execution. Real-time matching, debugging, and learning tools.
/
/gu
[a-z] \d \w \s \D \W \S .
* + ? {n} {n,} {n,m}
^ $ \b \B
( ) (?: ) (?= ) (?! )
|
\
0 characters
0 lines
0 words
$& – Full match
$` – Before match
$’ – After match
$1 – Group 1
$2 – Group 2
$$ – Dollar sign
Highlighted Matches
Match Details & Capture Groups
| # | Position | Full Match | Length | Groups | Actions |
|---|
Replacement Result
Original:
0 chars
Result:
0 chars
Changes:
0
Regex Debug Information
Pattern Source:
Compiled Regex:
Last Index:
0
Steps:
0
Backtracking:
No
Pattern Visualization
Pattern Explanation
Click “Explain Pattern” to see detailed explanation
Regex Cheat Sheet
Character Classes
. | Any character except newline |
\d | Digit (0-9) |
\D | Not a digit |
\w | Word character (a-z, A-Z, 0-9, _) |
\W | Not a word character |
\s | Whitespace (space, tab, newline) |
\S | Not whitespace |
[abc] | Any of a, b, or c |
[^abc] | Not a, b, or c |
[a-z] | Character between a and z |
Quantifiers
* | 0 or more |
+ | 1 or more |
? | 0 or 1 |
{3} | Exactly 3 |
{3,} | 3 or more |
{3,5} | 3, 4, or 5 |
*? | Lazy 0 or more |
+? | Lazy 1 or more |
?? | Lazy 0 or 1 |
Anchors & Boundaries
^ | Start of string/line |
$ | End of string/line |
\b | Word boundary |
\B | Not word boundary |
\A | Start of string |
\Z | End of string |
Groups & References
( ) | Capturing group |
(?: ) | Non-capturing group |
(?= ) | Positive lookahead |
(?! ) | Negative lookahead |
(?<= ) | Positive lookbehind |
(? | Negative lookbehind |
\1 | Backreference to group 1 |
