1
我想要格式化html文檔,並且它已充滿內聯css。我使用notpad ++並嘗試使用正則表達式來格式化它。 我想用style =''替換style ='font-family:「Arial」,「sans-serif」....... etc''How to say從正則表達式中刪除style =''中的所有內容
如何用正則表達式來實現?
我是新來的正則表達式。
我想要格式化html文檔,並且它已充滿內聯css。我使用notpad ++並嘗試使用正則表達式來格式化它。 我想用style =''替換style ='font-family:「Arial」,「sans-serif」....... etc''How to say從正則表達式中刪除style =''中的所有內容
如何用正則表達式來實現?
我是新來的正則表達式。
替換:
style='[^']+'
有:
style=''
[^']+
匹配一個或多個字符不是引號('
)
感謝很多,它的工作原理 – wordpressm
精湛,這是否也適用於雙引號(不是我沒有發現不沒有找到並替換雙重單)但只是好奇? –