SH Autolink, modify regular expression
-
Hi,
I’m using SH Autolink, but I have a slight problem with links showing up in my subheaders (H2).
I guess it’s because of the regular expression (see below) in the plugin, but I have no idea how to modify it.
Can anyone do a regular expression trick, so links aren’t created if the anchor text is in a H2 tag.
The regular expression line goes like this:
$strText = preg_replace("|(?!<[^<>]*?)(?<![?./&])\b$strLinkname\b(?!:)(?![^<>]*?>)|imsU","<a target=\"$strTarget\" href=\"".$strProtocol."$strUrl\">$strLinkname</a>" , $strText, 1, $replaceCount);
Thanks, Brian
- The topic ‘SH Autolink, modify regular expression’ is closed to new replies.