Code: Select all
preg_match_all('/<\?php(\S|.)*\?>?/', $buff, $php);Code: Select all
preg_match_all('/<\?php([\s\S])*\?>?/', $buff, $php);I can't figure out how to get the regex to match PHP tags which span multiple lines???
Also if you can see anything wrong with it (other than it ignores <script> <? or <% tags) please let me know
Cheers