Title: Instructions for regex pattern, hack fix?
Last modified: January 27, 2017

---

# Instructions for regex pattern, hack fix?

 *  [jefferisp7](https://wordpress.org/support/users/jefferisp7/)
 * (@jefferisp7)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/instructions-for-regex-pattern-hack-fix/)
 * Hi folks, I am on a shared server and am seeing posts being hacked with incorrect
   links like
 *  `<a style="text-decoration:none" href="/vardenafil-prices-costco">.</a>'`
 * I can’t find instructions on (I’m not a regex user normally), on how to search
   for this pattern in this plugin. I tried `<a style="text-decoration:none" * </
   a>`
    but that didn’t work… Please help me with some simple guidelines.
    -  This topic was modified 9 years, 4 months ago by [jefferisp7](https://wordpress.org/support/users/jefferisp7/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [jefferisp7](https://wordpress.org/support/users/jefferisp7/)
 * (@jefferisp7)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/instructions-for-regex-pattern-hack-fix/#post-8708333)
 * Hey, I found a site that helped me and I used this for a search pattern:
    `<a
   style="text-decoration:none" href=".*".*a>`
 * However, when I ran the replace with an empty replace value, it left this result:
   <>
 * How do I replace with a space or nothing at all?
    TIA, Jeff
    -  This reply was modified 9 years, 4 months ago by [jefferisp7](https://wordpress.org/support/users/jefferisp7/).
 *  [Francks](https://wordpress.org/support/users/franck-awo/)
 * (@franck-awo)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/instructions-for-regex-pattern-hack-fix/#post-9226590)
 * Hi jefferisp7, I would try something like :
    Search pattern : `@<a style="text-
   decoration:none" href=".*".*a>@` Replace pattern : Note the @ character as a 
   delimiter and let Replace pattern empty. Double check Search, Replace, before
   Replace and save !-) Good luck!
    -  This reply was modified 8 years, 12 months ago by [Francks](https://wordpress.org/support/users/franck-awo/).
 *  [Francks](https://wordpress.org/support/users/franck-awo/)
 * (@franck-awo)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/instructions-for-regex-pattern-hack-fix/#post-9240983)
 * And check the Regex: box 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Instructions for regex pattern, hack fix?’ is closed to new replies.

 * ![](https://ps.w.org/search-regex/assets/icon-256x256.jpg?rev=1030025)
 * [Search Regex](https://wordpress.org/plugins/search-regex/)
 * [Support Threads](https://wordpress.org/support/plugin/search-regex/)
 * [Active Topics](https://wordpress.org/support/plugin/search-regex/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-regex/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-regex/reviews/)

## Tags

 * [regex](https://wordpress.org/support/topic-tag/regex/)

 * 3 replies
 * 2 participants
 * Last reply from: [Francks](https://wordpress.org/support/users/franck-awo/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/instructions-for-regex-pattern-hack-fix/#post-9240983)
 * Status: not resolved