ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rémon van Gijn <r.van.g...@portinfolink.com>
Subject RE: propertyregex regexp construct question
Date Mon, 13 Nov 2006 11:00:07 GMT
Scot & Bill, many thanks, that did the trick perfectly.


-----Original Message-----
From: Scot P. Floess [mailto:floess@mindspring.com] 
Sent: vrijdag 10 november 2006 17:36
To: Ant Users List
Subject: Re: propertyregex regexp construct question

Rémon:

Set regexp = "([^-]+)-([^-]+)(-(.*))"

and select = "\3"

This assumes a pattern where you have some chars, a dash, some more 
chars and then a final dash...

Scot

Rémon van Gijn wrote:
> Hi
>
> I want to use the propertyregex (ant-contrib) to lean up a string:
>
> PCS-VARIABLEAPPNAME-2.8.3-85
>
> Basically I want to strip all until the second '-', so that '-2.8.3-85' remains.
>
> Could anyone give me a hand with the regexp and select?
>
> <propertyregex property="pack.name"
> 		              input="${application.version}"
> 		              regexp="\-([^\.]*\)"
> 		              select="\1"
> 		              casesensitive="false" />
>
> thanks,
>
> Remon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>   

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message