Contact + 01323 760 760

PHP preg_match Regular Expression (Regexp) Tester

This useful utility allows you to test your regular expressions with PHP's preg_match function. Enter a subject and a pattern and the matches array generated by preg_match will be displayed. Scroll down for the results.

Example

This example result shows how to extract a distance specified in miles, furlongs, and yards. The distance can take a number of different formats: 6m 2f 110y, 6m 2f, 6m 110y, 2f 110y, 6m, 2f, or 110y, either with spaces or without. The number of miles is shown in array[2], the furlongs in array[4], and the yards in array[6].

Test your regular expression