How to remove all inline styled开发者_StackOverflow社区 style=properties+val
from every tag from a long source code quickly.
For example.
<p style="border:2px red solid">some text</p>
<span style="background:red">some text</span>
to
<p>some text</p>
<span>some text</span>
Assuming your editor supports regular expression find and replace (and if it doesn't, get a new editor):
Find with this regular expression: \s?style="[^"]*"
Replace with: nothing!
Note that this will not catch instances where your code is malformed, as shown in your example (missing double quote at the end of the first style).
精彩评论