I have a wysiwyg editor at my end and it disables the first regular expression that I wrote. This is in PHP4 using preg_replace() . I collect the URI and related text.
@<a\shref=\"http[s]?://([^\"]*)\"[]>(.*)<\/a>@siU
The client wanted all external links to open in a new window, so the expression that I used to find all (hopefully) external links, but leave internal links to the page anchor, etc.
I realized that the wysiwyg editor adds style="font-weight: bold" if the user selects a bold font by reference. I just recently started learning regular expressions, so I'm not sure how to solve this problem.
How can I do it?
php regex
alex
source share