Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
(?:<style>((?:.*?\r?\n?)*)<\/style>)+|(?:<script>((?:.*?\r?\n?)*)<\/script>)+|(style=\"[^\"]*\")
/
g

Description

Easy remove any <style>, <script> tag and inline styles for clean code

Submitted by Patryk Padus - 7 years ago (Last modified 2 years ago)