Regular Expressions 101

Remove script tags from code

Open Workspace
  • PCRE (Legacy)
  • Match
2

Regular Expression

/
(<script.*>|<\/script>)
/
ig

Description

Regular expression to remove only the tags from the code. The regular expression only removes the tags, not the JS code inside the tag.

Submitted by IvenMS