【发布时间】:2012-04-19 13:44:20
【问题描述】:
如何使用 Notepad++ 从文件中的所有 url 中查找和删除 utm_content 参数?
样本数据:
http://example.com/content1.html?utm_content=product1
http://example.com/abc2.html?utm_content=homepage
http://example.com/test/?utm_content=sku1234
http://example.com/runapp?utm_content=31231KS
http://example.com/blabla?utm_content=nl-laptops-tablets
想要的结果:
http://example.com/content1.html
http://example.com/abc2.html
http://example.com/test/
http://example.com/runapp
http://example.com/blabla
注意:据我了解,Notepad++ 正则表达式使用标准 PCRE (Perl) 语法。
【问题讨论】:
-
这不是一个编程问题,因为您只是在处理文本编辑器;因此,我相信它属于超级用户。
-
@Chris Morgan:Notepad++ 主要由程序员使用,所以 Stack Overflow 上的问题就好了。
-
@BoltClock'saUnicorn:如果它与编码(操作代码)直接相关,我同意它仍然属于这里,但是当它只是处理所有可见意图时只是一个列表的 URL,我觉得它不属于这里。但这还不足以引起大大惊小怪。