简体   繁体   English

Notepad ++搜索并替换xml ID

[英]Notepad++ search and replace xml ids

Is there any way to search and replace a name="" attribute with unique names in notepad++? 有什么方法可以在notepad ++中用唯一名称搜索和替换name =“”属性? I simply want to remove the whole name="" attribute. 我只想删除整个name =“”属性。

Is there any way in notepad++ to do this with a regex? 在notepad ++中有什么办法可以使用正则表达式执行此操作?

The name attribute looks like this: name属性看起来像这样:

name="myTag1"

Where 1 is a unique id. 其中1是唯一ID。

Thanks! 谢谢!

Use the replace function with this regex 在此正则表达式中使用替换功能

name="myTag[0-9]+"

Don't forget to check the regular expression checkbox in the replace function dialog. 不要忘记在替换函数对话框中选中正regular expression复选框。

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

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