ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: propertyregex
Date Tue, 02 Sep 2008 14:01:27 GMT

Hi,

as Jan and Stefan already stated the {5} in the first goup
is wrong.

Notice you may write \d instead of [0-9], so  =

<propertyregex
  property="adjustedDate"
  input="${date}"
  regexp="(\d{4})(\d{2})"
  replace="\1/\2"/>

will do the job.

btw. if the ${date} comes from a tstamp task, you
don't need the propertyregex stuff at all, f.e. =

<tstamp>
  <format property="date" pattern="yyyy/MM"/>
 </tstamp>

will give you =

[echo] ${date} == 2008/09


Regards, Gilbert

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


Mime
View raw message