I have another question about this preg_replace... I know how to find/replace/remove regular text... but i would like to go depper and remove something like: $search='#(<SCRIPT*ADS CODE BY GOOGLE, COPYRIGHT INTERNET ARCHIVE)(.*)(</SCRIPT>)#esm'; I can only match now $search='#(<ADS CODE BY GOOGLE, COPYRIGHT INTERNET ARCHIVE)(.*)(</SCRIPT>)#esm'; and the script type="javascript/text" will remain there? so how i can add the * "opener" line every start from <script ********* ads code by google> and end at <script?!