Regex Tester
Test JavaScript regular expressions with live match highlighting
Cheatsheet
\d digit · \w word · \s whitespace\D non-digit · \W non-word · \S non-whitespace. any · ^ start · $ end* 0+ · + 1+ · ? 0–1 · {n,m}[abc] set · [^abc] not in set · [a-z] range(...) group · (?:...) non-capturing · (?<n>...) named| or · \b word-boundary · \B not boundary(?=...) lookahead · (?!...) negative · (?<=...) lookbehindBuild, test and debug JavaScript regular expressions with live match highlighting, capture group inspection and a quick reference cheatsheet. Useful for validation patterns, search and replace, log parsing and form input.
How to test a regular expression
Type the regex without slashes — e.g. \\d+ for one or more digits.
Paste the text you want to match against in the test field.
Each match and capture group is shown with its position and value.
Matches are highlighted in your test string as you type the pattern.
Each match is broken down by group number and named groups.
Toggle g, i, m, s, u and y flags individually to see how matches change.
Built-in reference for common metacharacters, character classes and quantifiers.