ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Amerige <Steve.Amer...@sas.com>
Subject Negative Lookahead and Regexp
Date Wed, 09 Nov 2011 20:40:38 GMT
Hi all,

Is negative lookahead supported at all in Ant 1.7 and higher (Ant-Contrib, too)?  Maybe my
syntax is off:

<propertyregex property="result" input="a.b.c.bad" select="\1" regexp="(.*(?!bad))" defaultValue=""
override="true"/>
<propertyregex property="result" input="a.b.c.ok" select="\1" regexp="(.*(?!bad))" defaultValue=""
override="true"/>

The first result should be the empty string and the second result should be "a.b.c.ok".  I'm
also looking to use this idea in 
<propertyset> to exclude certain properties.

See the regular expression page on this:

     http://www.regular-expressions.info/lookaround.html

Thanks for any assistance!

Enjoy,
Steve Amerige
SAS Institute, Deployment Software Development


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message