I have folder names with convention as below:
org.apache.commons.httpclient_3.1.0.v20170718_1537
org.apache.commons.httpclient_3.1.0.v20170718-1537
org.apache.james.mime4j_0.6.0.v20120423
In these I wanted to separate the names alone without the version names. (**Example:**org.apache.commons.httpclient_3.1.0.v20170718_1537 to be mentioned as org.apache.commons.httpclient)
<propertyregex property="MyRegex"
input="@{MyFolder}"
regexp="_(.*)"
select="\0"
casesensitive="false" />
I wanted to separate the name alone using ANT. So I have tried regex like "_(.*)" (I have tried with some other regex expressions also, that too doesn't work out), but it is separating after underscore and the before underscore values I couldn't fetch.
In my case as I mentioned above in the convention I need to handle all the 3 scenarios of naming convention to separate the names without version.
Since I am blocked with this, please help will the inputs. Thanks !!