Results 1 to 2 of 2

Thread: [RESOLVED] [2005] Regular Expression problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Location
    Indiana
    Posts
    451

    Resolved [RESOLVED] [2005] Regular Expression problem

    Hello,

    I was wondering if someone could help me with a couple of expressions that I can't seem to get right. I get close, but not exact.

    I was able to get everything between the body tags on an HTML page. Now, I want to strip out all of the script tags. Since script tags can be <script>Some words</script> or <script /> I am having a hard time with this one. here is the script I have so far.

    Code:
    (?=<script.*/>)|(?=<script.*>).*(?<=</script>)
    I am also trying to strip out all of the other tags, to get the inner text as well, but can't seem to get close to doing that.

    Thank you for your help.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2005
    Location
    Indiana
    Posts
    451

    Re: [2005] Regular Expression problem

    With the help of another tutorial, I got the script tags solved.

    Code:
    <script[^/>]+/>|<script[^>]+>[^>]+>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width