Live highlighting
Matches are highlighted in your test text as you type the pattern.
Test JavaScript regular expressions with live match highlighting.
Loading tool…
Write a pattern, paste sample text and see every match highlighted as you type, with capture groups listed below. Use it to check validation rules, parse log files or build redirect patterns before they go into code.
Matches are highlighted in your test text as you type the pattern.
Numbered and named groups are listed for every match.
Try a replacement string, including $1 and $<name> references, before using it in code.
4 quick steps. Going deeper? Read WordPress plugin development: structure, hooks and security done right.
Enter the pattern without surrounding slashes.
Toggle flags: g (all matches), i (ignore case), m (multiline), s (dot matches newline), u (Unicode).
Paste test text; matches highlight instantly and groups appear in the table.
Optionally enter a replacement (use $1, $2 or $<name>) to preview the result.
Typical situations where this tool saves time.
Short answers about privacy, limits and how the tool works.
JavaScript (ECMAScript) regular expressions, the same engine used in browsers and Node.js. Most patterns also work in PHP's PCRE, but lookbehind and named-group syntax can differ.
Without the g flag, JavaScript stops after the first match. Turn on g to find all matches.
Badly nested quantifiers can backtrack for a long time. The tester caps the number of matches, but avoid patterns like (a+)+ on long text.
I build custom calculators, admin utilities and integrations for WordPress, Laravel and Next.js teams.
2 matches
[17-Oct-2026 09:12:44 UTC] PHP Warning: Undefined array key "id" in /var/www/html/wp-content/plugins/acme/acme.php on line 88 [17-Oct-2026 09:12:45 UTC] PHP Fatal error: Uncaught Error: Call to undefined function acme_rules() in /var/www/html/wp-content/themes/child/functions.php:42 [17-Oct-2026 09:13:02 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted in /var/www/html/wp-includes/class-wpdb.php on line 2349
| # | Match | Groups |
|---|---|---|
| 1 | PHP Fatal error: Uncaught Error: Call to undefined function acme_rules() in /var/www/html/wp-content/themes/child/functions.php:42 | message: Uncaught Error: Call to undefined function acme_rules() | file: /var/www/html/wp-content/themes/child/functions.php:42 |
| 2 | PHP Fatal error: Allowed memory size of 134217728 bytes exhausted in /var/www/html/wp-includes/class-wpdb.php | message: Allowed memory size of 134217728 bytes exhausted | file: /var/www/html/wp-includes/class-wpdb.php |