Test and debug JavaScript regular expressions in real-time with pattern highlighting.
Common regex tokens, character classes, anchors, and quantifiers used in Javascript, Python, and PCRE.
| Token / Pattern | Category | Meaning & Example |
|---|---|---|
\d / \D | Character Class | Matches any digit (0-9) / non-digit. |
\w / \W | Character Class | Matches word character (a-z, A-Z, 0-9, _) / non-word. |
\s / \S | Character Class | Matches whitespace (spaces, tabs, newlines) / non-whitespace. |
^ / $ | Anchors | Matches beginning of string / end of string. |
+ / * | Quantifiers | Matches 1 or more times / matches 0 or more times. |
? | Quantifiers | Matches 0 or 1 time (optional) / lazy modifier. |
{n,m} | Quantifiers | Matches between n and m repetitions. |
[a-z0-9] | Character Set | Matches any character inside the set. |
[^0-9] | Negated Set | Matches any character NOT in the set. |
(abc) | Capture Group | Groups sub-pattern and captures matched text. |
(?:abc) | Non-Capture Group | Groups sub-pattern without capturing. |
Test and debug JavaScript regular expressions in real-time with pattern highlighting.
Regular Expressions (Regex) provide pattern-matching for text validation and extraction. Our real-time Regex Tester tests patterns against sample text with live match highlighting, capture groups, and flag support.
This online diagnostic utility is powered by ToolPing to provide fast, reliable, and secure network analytics for sysadmins and developers.
Type your Regex pattern and optional flags (g, i, m) into the top bar, and input your test string in the text box. Matches and capture groups are highlighted live as you type.