Python : To list files if my keyword contains using regular expression

Python: (.py file)

I have to pass a property file’s path which resides inside a jar in to the classpath while java complile.

vmargs = {
"-DApplicationName" : "myApp",
"-Dport" : "8080",
"-DpropertyFile" : "WEB-INF/library/JARFILE-45.33.jar:/properties/somefile.property"
}

The above code works fine when JARFILE has the version 45.33. But how can i give the path dynamically something like:

“-DpropertyFile” :
“WEB-INF/library/JARFILE-(RegEx).jar:/properties/somefile.property”

NB:
The version (45.33) can be any number of charector. Example as follows:

Beta-44.55
Beta1-33.33
7777.ee44
44.22222


Source: regex

Leave a Reply