Search

All tools
Laravel & PHP

PHP Regex Tester

Test a regular expression with PHP preg_match or preg_match_all and inspect capture groups.

Example links fill the form. Test runs on the server and is not stored in the URL.

Examples

How it works

This runner uses PHP PCRE, the same engine as preg_match. Add delimiters yourself (/pattern/i) or paste a raw pattern and the tool wraps it. Testing is a POST so the pattern is not stored in the URL; example links only fill the form. Backtrack and recursion limits are lowered for the request so a greedy pattern fails instead of hanging the worker. Errors come from preg_last_error_msg().

Related tools

Related reading

Your experience on this site will be improved by allowing cookies Cookie Policy