Your task:
✓ Correct! You've finished every lesson — try the Tester with your own text.
Hint:
Press Ctrl + D to bookmark Regex Tester.
Open your browser menu (⋮ or the share icon) and tap Bookmark or Add to Home Screen.
Test regular expressions live with highlighted matches, groups, replace and a plain-English explanation — or learn regex step by step in 14 hands-on lessons.
Stopped after 1.5 seconds. This pattern is probably stuck in catastrophic backtracking — usually nested quantifiers like (a+)+ or (.*)*. On a server, the same pattern could freeze a request.
Showing the first 1,000 matches.
No matches. Check the explanation below to see what the pattern looks for.
Type a pattern to see it explained, piece by piece.
This tester uses JavaScript's engine. PHP (PCRE) and Python accept almost the same syntax; Python spells named groups (?P<name>…), which the snippet does for you.
.\d \w \s\D \W \S[abc][^abc][a-z]\.^$\b\B*+?{3}{2,5}{2,}*? +?(abc)(?<name>abc)(?:abc)a|b\1(?=abc) (?!abc)(?<=abc) (?<!abc)Your task:
✓ Correct! You've finished every lesson — try the Tester with your own text.
Hint:
A regular expression (regex) is a pattern for finding text, such as \d{3}-\d{4} for a phone-number fragment. The tester highlights every match as you type and explains what each part of the pattern does. New to regex? The Learn tab teaches it in 14 short lessons, each with a task you solve right on the page.
JavaScript regular expressions, as used in browsers and Node.js. Most syntax is the same in PHP (PCRE) and Python; the code panel converts named groups to Python's (?P<name>…) form for you.
g finds all matches instead of just the first, i ignores case, and m makes ^ and $ match at the start and end of each line. s lets the dot match line breaks, and u turns on full Unicode support.
Escape it with a backslash: \. On its own, a dot matches any character. The same goes for other special characters such as $ ( ) [ ] { } * + ? | ^ and \.
Open the Learn tab. It starts with plain text and builds up through character sets, shorthands like \d, quantifiers, anchors, groups, back-references, lookahead and flags. Each lesson has a small task checked as you type, and your progress is saved in your browser.
Quantifiers like + and * are greedy and match as much as they can. Adding ? makes them lazy, so <.+?> matches each HTML tag separately instead of everything from the first < to the last >.
Switch to Replace and use $1, $2 for numbered groups, $<name> for named groups and $& for the whole match. For example (\w+) (\w+) with $2 $1 swaps two words.
Patterns with nested quantifiers, such as (a+)+ or (.*)*, can take exponential time on text that almost matches. The tester runs each pattern in the background and stops it after 1.5 seconds so the page never freezes. Rewrite the pattern so the repeated parts cannot overlap.