Ant 使用正则表达式的蚂蚁子串

Ant 使用正则表达式的蚂蚁子串,ant,Ant,我有一根像下面这样的线 C:\deployment\dep\u Scripts\OSB\configuration\sbconfig1.jar 从这个字符串中,我只想提取文件名sbconfig1 如何使用regex实现这一点,Ant的basename任务可以做到: <basename property="jar.name.without.extention" file="C:\deployment\dep_Scripts\OSB\configuration\sbconfig1.jar"

我有一根像下面这样的线 C:\deployment\dep\u Scripts\OSB\configuration\sbconfig1.jar 从这个字符串中,我只想提取文件名sbconfig1


如何使用regex实现这一点,Ant的basename任务可以做到:


<basename property="jar.name.without.extention" file="C:\deployment\dep_Scripts\OSB\configuration\sbconfig1.jar" suffix="jar"/>

<echo message="${jar.name.without.extention}"/>