Regex Tester
Try a pattern against text and see every match, group and capture as you type.
/
/
$1 is the first group, $<name> a named one, $& the whole match and $$ a literal dollar sign.
Result
Matches
After replacing
Good to know
- The pattern runs in a worker thread. Nothing can interrupt a regular expression once it starts — no timeout, no try/catch — so a pattern that goes wrong is killed with the thread it is in, and this page stays alive.
- Named groups are shown next to their number, because a named group is also a numbered one: (?<year>\d{4}) is both.
- A pattern that can match nothing — like a* — matches at every position. Those zero-length matches are real and are marked, rather than skipped.
- This is the JavaScript flavour, where \w, \d and \b are ASCII-only whatever flags you set: /\b\w+\b/ finds "ok" inside "çok". Unicode letters need \p{L} together with the u flag.
31 views