preg_replace

Discussion in 'PHP' started by redhits, Oct 28, 2009.

  1. #1
    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?!
     
    redhits, Oct 28, 2009 IP