Hi Guys
I have a wysiwyg editor in my back end, and it is tripping up the first regular expression I wrote. This is in PHP4, using preg_replace()
. I'm capturing the URI and linked text.
@<a\shref=\"http[s]?://([^\"]*)\"[]>(.*)<\/a>@siU
The client wanted all external links to open in a new window, so that's the expression I was using to find all (hopefully) external links, but leave internal, page anchor links, etc
I realised the wysiwyg editor also adds style="font-weight: bold"
if the user selects bold on the link. I've only recently started learning regular expressions so I'm unsure how to go about this problem.
Any help would be much appreciated!!