【发布时间】:2012-08-01 05:10:45
【问题描述】:
我正在尝试使用 antcontrib 的 propertyregex 进行子字符串操作。这是我的原始字符串:
COMPONENT:MYBuild:cat:cat
我试图从上面的字符串中提取MYBuild。
<propertyregex property="builderName"
input="${componentLine}"
regexp="(.*)COMPONENT:.*:"
replace=""
casesensitive="true"
override="true"/>
但这让我着迷
COMPONENT:MYBuild:cat:
有人可以帮忙吗?
【问题讨论】:
标签: regex ant regex-negation regex-greedy ant-contrib