i'm using the following Ant script to check a string and create another string based on it.
ex: subversao = 4.2.1 and my new string(versao) will be 4.2
<loadresource property="versao">
<string value="${subversao}"/>
<filterchain>
<tokenfilter>
<replaceregex pattern="(.*)\.[^\.]+" replace="\1"/>
</tokenfilter>
</filterchain>
</loadresource>
And now i want to be able to write 4.2.1 or 4.2.1-something-0.0.2 and still be able to get the 4.2 out of it.
No comments:
Post a Comment