ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bill/wilandra" <b...@wilandra.com>
Subject RE: propertyregex regexp construct question
Date Fri, 10 Nov 2006 16:46:02 GMT
The following reg ex should work for you:
[^-]*-[^-]*-(.*)
You will need to adjust it so it works in <propertyregex> by adding
appropriate escapes.

I use the RegexCoach tool to check reg exs. It is available from
http://weitz.de/regex-coach. 

HTH Bill

-----Original Message-----
From: RĂ©mon van Gijn [mailto:r.van.gijn@portinfolink.com] 
Sent: Friday, November 10, 2006 7:56 AM
To: Ant Users List
Subject: propertyregex regexp construct question

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





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


Mime
View raw message