a:life:echo("$text matches life<br>"); p:w(0{1}|o{1})rld:echo "$text matches w(0{1}|o{1})rld type p<br>";
info at phpclasses dot org