简体   繁体   English

记事本++正则表达式搜索替换html标记

[英]notepad++ regex search replace in html tag

What I want is to replace: 我想要的是取代:

<meta name="description" content="some content here"> 

to

<meta name="description" content="">

I hope it isn't to hard for notepad++. 我希望记事本++不难。

You can do something like this: 你可以这样做:

  1. replace content="[^"]*" with content="" replace content="[^"]*" with content=""

see screenshot 看截图 在此输入图像描述

Unless you specifically want the content attribute only from meta tags 除非您特别希望内容属性仅来自元标记

在替换对话框中启用“正则表达式”并尝试搜索:

<meta name="description" content="[A-Za-z0-9].*">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM