i need to uses reg ex to change <a href="url"> to <a href="url"
target=_blank>
 
the < brackets have to be represented using &lt; and &gt;
 
I have tried so many ways, but none work. here is an example of my
faliure.
 
$body =
preg_replace("/(href=\/?)(\w+)(&gt;\/?)/e","'\\1'.'\\2'./'target=_blank/
'.'\\3'", $body);
 
Thanks

Reply via email to