Regex
Build and debug regular expressions without blocking the page.
Patterns and test text stay in your browser. Evaluation runs in an isolated worker with a strict timeout.
- Processing
- Local browser only
Evaluated locally with the JavaScript regular-expression engine in your browser.
Use $1, $2, or $<name> to reference captured groups.
Syntax highlighting
Pattern Breakdown
Pattern explanation
Optimizer
Visual debugger
No matchesOnly the first 200 matches are displayed.
Match details
| # | Match | Range | Groups |
|---|
Extracted data
—Generated pattern
Quick reference for the most common JavaScript regular-expression tokens.
Characters and classes
.- Any character except a line break
\d\D- Digit / non-digit
\w\W- Word / non-word character
\s\S- Whitespace / non-whitespace
[abc][^abc]- Inside / outside the character set
Anchors and alternatives
^$- Start / end of string or line
\b\B- Word / non-word boundary
x|y- Match x or y
Quantifiers
*+?- Zero or more / one or more / optional
{n}{n,}- Exactly n / at least n repetitions
{n,m}- Between n and m repetitions
*?+?- Lazy repetition
Groups and lookarounds
(x)- Capturing group
(?:x)- Non-capturing group
(?<name>x)- Named capturing group
(?=x)(?!x)- Positive / negative lookahead