更新时间:2023-02-17 23:01:35
我觉得这样可以:
/style="[a-zA-Z0-9:;.s()-,]*"/gi
如果您只想替换某些部分,也可以将它们放入捕获组中
You could also put these in capturing groups, if you wanted to replace some parts only
/(style=")([a-zA-Z0-9:;.s()-,]*)(")/gi
工作示例: http://regexr.com?2up30