Is there an operator ANDfor PHP? Regex.
I am trying to replace everything with documentwith 'AND ).
$output = preg_replace('/document.*\'/', '', $output);
Any idea how this can be done?
I tried to find a tutorial for Regex, but I can not find anything good. If you have good sites or books, please give me a link. I googled a lot.
Thank.
EDIT: Misunderstanding.
This is the code before replacing.
<p>document.write(unescape('
<embed src="XXXXXX" type="application/x-shockwave-flash" wmode="window" width="712" height="475"%.35" allowFullScreen="true" ></embed>
')));</p>
I want to do this:
<p>
<embed src="XXXXXX" type="application/x-shockwave-flash" wmode="window" width="712" height="475"%.35" allowFullScreen="true" ></embed>
</p>
Replaced by:
document.write(unescape('
and
')));
source
share