简体   繁体   English

notepad ++中用于替换的正则表达式

[英]Regular expression in notepad++ for replace

I want to search 我要搜寻

15.2.0.23-20150414.114733-8.jar
15.2.0.23-20150414.112741-3.jar
15.2.0.23-20150414.114753-5.jar
15.2.0.23-20150414.111343-8.jar

this pattern in my file by notepad++. 通过记事本++在我的文件中使用此模式。 Can anyone suggest the right regex? 谁能建议正确的正则表达式? I am trying it with 20150414.11*\\.jar , but it's not working. 我正在尝试使用20150414.11*\\.jar ,但无法正常工作。

20150414.11*\.jar

would match 20150414.1.jar , 20150414.1111111.jar or 20150414X1.jar (note that . matches any character, and * repeats the preceding token ( 1 in this case) any number of times). 将与20150414.1.jar20150414.1111111.jar20150414X1.jar匹配(请注意, .匹配任何字符,并且*重复前面的标记(在这种情况下为1 )任意次)。

You want something like 你想要类似的东西

20150414\.11[^.]*\.jar

Explanation: 说明:

20150414 # Match "20150414"
\.11     # Match ".11"
[^.]*    # Match any number of characters except dots
\.jar    # Match ".jar"

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

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