Title: SH Autolink, modify regular expression
Last modified: August 19, 2016

---

# SH Autolink, modify regular expression

 *  [sethson](https://wordpress.org/support/users/sethson/)
 * (@sethson)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/sh-autolink-modify-regular-expression/)
 * Hi,
 * I’m using [SH Autolink](https://wordpress.org/support/topic/sh-autolink-modify-regular-expression/www.rockschtar.de/wp-plugin-sh-autolink/?output_format=md),
   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.

 * 0 replies
 * 1 participant
 * Last reply from: [sethson](https://wordpress.org/support/users/sethson/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/sh-autolink-modify-regular-expression/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
