Loading ...
Sorry, an error occurred while loading the content.

Help with regex... removing some html tags

Expand Messages
  • mbl60181
    Another regular expression neophyte here... I have about 250 html pages and I need to remove all of the javascript. Each page has multiple scripts. My problem
    Message 1 of 1 , Aug 6 7:46 AM
    • 0 Attachment
      Another regular expression neophyte here...

      I have about 250 html pages and I need to remove all of the
      javascript. Each page has multiple scripts. My problem is, I just
      can't find the right combination for the regex.

      Each javascript has:
      <script
      every possible character and line feed combination
      </script>

      Using the following statement:
      (<script\a+(</script>))

      It finds the first occurrence of <script and the very last occurrence
      of </script>. It never finds </script> tags that fall in-between. Of
      course, it also selects other tags that I need to keep when it only
      grabs the last </script>.

      I haven't even thought about what the replacement statement should
      look like... I'm guessing that it would be blank because I want to
      remove all occurrences.

      Any help would be appreciated.
      -Mike
    Your message has been successfully submitted and would be delivered to recipients shortly.