|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: Regex: Strip <script> tags?by sanPerl (Friar) |
| on Mar 22, 2007 at 06:26 UTC ( [id://605964]=note: print w/replies, xml ) | Need Help?? |
|
It is better to use some ready-to-eat kind of CPAN module. However if you want a simple soltion then here it is. It will work for following kinds of tags 1) <script> ( should be deleted ) 2) <script a="aaa"> (should be deleted ) 3) <script1> (This should be retained by regex) 4) ANY OTHER TAG other than mentioned above (This should be retained by regex)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||