我需要一种方法来选择“h1”之后的所有“h1”,以使用正则表达式将其替换为空。我也需要它为@import工作。
我需要改变这一点:
<link href='http://fonts.googleapis.com/css?family=Special+Elite' rel='stylesheet' type='text/css'>
h1 { font-family: 'Special Elite', arial, serif; }
@import url(http://fonts.googleapis.com/css?family=Special+Elite);
<link href='http://fonts.googleapis.com/css?family=Quattrocento+Sans' rel='stylesheet' type='text/css'>
h1 { font-family: 'Quattrocento Sans', arial, serif; }
@import url(http://fonts.googleapis.com/css?family=Quattrocento+Sans);
<link href='http://fonts.googleapis.com/css?family=Smythe' rel='stylesheet' type='text/css'>
h1 { font-family: 'Smythe', arial, serif; }
@import url(http://fonts.googleapis.com/css?family=Smythe);
对此:
<link href='http://fonts.googleapis.com/css?family=Special+Elite' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Quattrocento+Sans' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Smythe' rel='stylesheet' type='text/css'>
1条答案
按热度按时间368yc8dk1#
**这一个应该匹配您要保留的行:
这一条应该与您要删除的行相匹配: