更新时间:2023-02-17 23:22:25
我认为可以这样做:
/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