我正在使用 Sublime Text。完全迷失了正则表达式。我有多个 html 文件:
<head>
<link rel="stylesheet" href="css/custom.css" type="text/css">
</head>
代码应更改为:
<head>
<link rel="canonical" href="http://example.com/catalog/example_unic.html" />
<link rel="stylesheet" href="css/custom.css" type="text/css">
</head>
并且每个
href="http:/example.com/catalog/example_unic.html"
应该更改为当前页面名称。我怎样才能达到这个结果?我关注了这个帖子正则表达式搜索在 Sublime 中替换 但没有得到我需要的结果。