How to use this simulator?

They are many ways to write legitimate regex patterns. Two different regex patterns can produce the same result. The purpose of this tester/simulator is to compare the efficiency of your patterns.

First, enter the text to text in the text box. Then, choose the type of PHP regex function you want to test. Don't forget to put the delimitters for the preg_match() or preg_match_all() functions!

If you want to test a replace pattern, you can use here the backreferences the PHP way: $1 or \1

Finaly, select the type of result you want see

Close this window