Aamir
Aamir

Reputation: 2422

RegEx pattern any URL ending with digits.jar

Please assist with the proper RegEx matching. Any URL ending with 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

Upvotes: 0

Views: 234

Answers (1)

james jelo4kul
james jelo4kul

Reputation: 829

use this regex pattern

String patt="(.*\d+\.jar)$"

See the demo here https://regex101.com/r/pX6yS4/1

Upvotes: 2

Related Questions