我需要在 HTML 标签、内联的 CSS 中搜索和替换,以避免使用style=""内联属性。
即替换看起来像这样的东西:
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="font-family: Helvetica;line-height: 100%;margin-top: 20px; text-align: left;vertical-align: bottom;color: #202020">
Run Code Online (Sandbox Code Playgroud)
变成这样:
<table border="0" cellpadding="0" cellspacing="0" width="100%" font-family="Helvetica" line-height="100%" margin-top="20px" text-align="left" vertical-align="bottom" color="#202020">
Run Code Online (Sandbox Code Playgroud)
有人知道我必须编写的用于搜索和替换的正则表达式吗?
谢谢。