How can I check if a html document includes script tags that are not empty using a regular expressio

Posted by flobr on Stack Overflow See other posts from Stack Overflow or by flobr
Published on 2010-06-07T22:03:55Z Indexed on 2010/06/07 22:12 UTC
Read the original article Hit count: 139

Filed under:

I am trying to check if a html document includes script tags that are not empty using regular expressions. The regular expression should match any script tag with a content other than whitespaces or linebreaks.

I have tried

<script\b[^>]*>[^.+$]</script>

but this regex only finds script tags with one space.

© Stack Overflow or respective owner

Related posts about regex