ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Amerige <Steve.Amer...@sas.com>
Subject Re: Negative Lookahead and Regexp
Date Thu, 10 Nov 2011 12:50:39 GMT
Hi all,

So, I'm guessing that Ant 1.7+ (with optional Ant-Contrib) doesn't support negative lookahead
regex searches.

So, I'm refocusing on the main objective here: I want a propertyset that excludes properties
matching certain patterns.  Any idea as 
to how to accomplish this?

Thanks!
Steve Amerige
SAS Institute, Deployment Software Development

On 11/9/2011 3:40 PM, Steve Amerige wrote:
> 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


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