Preg() Preview

Fed up writing test cases when the PHP function preg_replace() isn't doing what you think it should? Use this page instead.

Inputs

Your pattern (you only have to include /delimiters/ if you want to use modes like case insensitive (i) etc):


Your replacement: (optional)

Text String:


Outputs

preg_replace():
Replace this text with the text you wish to use RegEx on.

preg_match_all():
Replace this text with the text you wish to use RegEx on.

preg_filter():
Replace this text with the text you wish to use RegEx on.

preg_split():
Array
(
    [0] => Replace this text with the text you wish to use RegEx on.
)



Regex Previewer by Matt Squirrell. All rights reserved, etc, etc.