Title: was replacing inside script tags
Last modified: March 22, 2017

---

# was replacing inside script tags

 *  [marketsys](https://wordpress.org/support/users/marketsys/)
 * (@marketsys)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/was-replacing-inside-script-tags/)
 * Had to modify the regex as it was replacing text inside some javascript tags 
   i had in the body content, so used:
 * $regex = “<script\b[^>]*>([\s\S]*?)<\/script>(*SKIP)(*F)|(?![<\[].*)\b({$old_text})\
   b(?![^<>\[\]]*?[\]>])”;
 * maybe could be added as an admin option, ignore replacements inside script tags?
    -  This topic was modified 9 years, 2 months ago by [marketsys](https://wordpress.org/support/users/marketsys/).

The topic ‘was replacing inside script tags’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/linkify-text_0074a2.svg)
 * [Linkify Text](https://wordpress.org/plugins/linkify-text/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/linkify-text/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/linkify-text/)
 * [Active Topics](https://wordpress.org/support/plugin/linkify-text/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/linkify-text/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/linkify-text/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [marketsys](https://wordpress.org/support/users/marketsys/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/was-replacing-inside-script-tags/)
 * Status: not resolved