vs code 批量替换

源内容

.icon-user,
.icon-people,
.icon-user-female,
.icon-user-follow,
.icon-user-following,
.icon-user-unfollow,
.icon-login,
.icon-logout,
.icon-emotsmile,

 

 目标内容

<li><span class="fa icon-user" aria-hidden="true"></span><span class="glyphicon-class">fa icon-user</span></li>
<li><span class="fa icon-people" aria-hidden="true"></span><span class="glyphicon-class">fa icon-people</span></li>
<li><span class="fa icon-user-female" aria-hidden="true"></span><span class="glyphicon-class">fa icon-user-female</span></li>
<li><span class="fa icon-user-follow" aria-hidden="true"></span><span class="glyphicon-class">fa icon-user-follow</span></li>
<li><span class="fa icon-user-following" aria-hidden="true"></span><span class="glyphicon-class">fa icon-user-following</span></li>
<li><span class="fa icon-user-unfollow" aria-hidden="true"></span><span class="glyphicon-class">fa icon-user-unfollow</span></li>
<li><span class="fa icon-login" aria-hidden="true"></span><span class="glyphicon-class">fa icon-login</span></li>
<li><span class="fa icon-logout" aria-hidden="true"></span><span class="glyphicon-class">fa icon-logout</span></li>
<li><span class="fa icon-emotsmile" aria-hidden="true"></span><span class="glyphicon-class">fa icon-emotsmile</span></li>

使用替换(把“使用正则表达式”打开)

.(.*),

<li><span class="fa $1" aria-hidden="true"></span><span class="glyphicon-class">fa $1</span></li>

(.*)为通配符

 

上一篇:退出实现


下一篇:Spring Security 退出登陆logout