Title |
Test
Find
Strip HTML tags and content between
|
Expression |
<(script|style)[^>]*?>(?:.|\n)*?</\s*\1\s*> |
Description |
This regular expression will match only <script> and <style> tags and all content between them. Use this with regex.replace to strip script blocks and style blocks from HTML source. |
Matches |
<script>test</script>, <style>test<style> |
Non-Matches |
-all other html code is ignored- |
Author |
Rating:
Charles Forsyth
|
Source |
|
Your Rating |
|
Title: eef
Name: erere
Date: 11/23/2010 2:16:59 PM
Comment:
rere
Title: The best one I have found!
Name: Brien
Date: 10/29/2008 6:06:14 PM
Comment:
EXCELENT! Only RegExp that I have found that actually matches all script tags in a page. I have looked through many, but the rest seem to fail. Thank you SO much for adding this