RegEx模式任何以digits.jar结尾的URL

时间:2015-09-17 16:39:09

标签: regex

请协助正确的RegEx匹配。任何以digits.jar

结尾的网址
These would be valid:
http://com.abc.com/path/etc/abc/12_34.jar
http://com.abc./tpa_pemt/abc/12.22.jar

These would not:
http://com.abc.com/path/etc/abc/Source.jar
http://com.abc.com/hel_o/docs.jar

1 个答案:

答案 0 :(得分:2)

使用此正则表达式

String patt =“(。* \ d + \ .jar)$”

请参阅此处的演示https://regex101.com/r/pX6yS4/1