ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: String translation/regex
Date Mon, 04 Mar 2002 22:06:06 GMT
--- Mark Derricutt <mark@talios.com> wrote:
> I have a property thats set to "5.0.019" for a version number, but cvs
> tags don't allow .'s, is there a way to do a regex and change all
> the .'s to _'s  from ant?

Or if you don't want to deal with reading and writing a file (and want to
see Erik cringe :) --

  <property name="version" value="5.0.019"/>

  <target name="setTag">
  <script language="javascript"> <![CDATA[
    cvstag = projname.getProperty("version").replace('.', '_');
    projname.setProperty("cvstag", cvstag);
    ]]></script>
    <echo message="cvstag  = ${cvstag}"/>
  </target>

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

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


Mime
View raw message