The tester runs your browser's JavaScript engine, so lookbehind, named groups and Unicode property escapes behave as they will in Node.js and front-end code, but not necessarily as in PHP, Python or Java. Counting stops at 5,000 matches and the group list shows details for the first 50.
- An unescaped dot matches any character, so write
\. for a literal full stop. - Use
\b for word boundaries: \bcat\b matches the word cat but not the cat inside concatenate. - Without the
u flag, an emoji counts as two characters, so . matches only half of it. Add u when you work with emoji or characters outside the basic range. - Do not type the slashes around the pattern, as in
/abc/g. The flags have their own box. - Greedy
.* runs to the last possible match; use .*? to stop at the first. - Without the
m flag, ^ and $ match only the start and end of the whole text. - Nested repeats such as
(a+)+$ can take exponential time on a failing match and may freeze the tab, so shorten the test text if the page stalls. - The presets are rough starting points. The email preset shows what an address looks like, but it cannot confirm that a mailbox exists.
It helps to know what each preset really matches. Date (YYYY-MM-DD) checks the shape only, so 2026-13-45 matches. IPv4 accepts 999.999.999.999. Hex colour needs exactly six digits, so the short form #fff is not found. Numbers matches runs of digits, so 3.5 is read as two numbers, 3 and 5, and a minus sign is not included. Edit the preset text in the box to tighten any of these.
To apply a replacement without patterns, use the find and replace tool. To compare the before and after text, paste both into the diff checker, and to clean the result of a JSON extraction try the JSON formatter. Pattern and text are evaluated locally and are not uploaded.