ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura" <stepan.mish...@gmail.com>
Subject Re: ant regex
Date Wed, 27 Jun 2007 13:27:39 GMT
The next works for me:

<project name="tmp" default="doit" basedir=".">

  <target name="doit">

    <path id="from.classpath">
      <pathelement location="C:\temp\dp\util\bin"/>
      <pathelement location="C:\temp\dp\util\stack"/>
    </path>

    <pathconvert property="to.classpath" refid="from.classpath" >
      <filtermapper>
         <replacestring from="\bin" to=""/>
      </filtermapper>
    </pathconvert>

    <echo message="${to.classpath}"/>

  </target>
</project>

$ ant
Buildfile: build.xml

doit:
     [echo] C:\temp\dp\util;C:\temp\dp\util\stack

BUILD SUCCESSFUL
Total time: 0 seconds

Thanks,
Stepan.

On 6/13/07, snenkov <snenkov@yahoo.com> wrote:
>
> I am using
>
> <pathconvert property="to.classpath" refid="from.classpath" >
> <mapper>
> <mapper type="regexp" from="(.*)bin(.*)" to="\1\2"/>
> </mapper>
> </pathconvert>
>
> where
>
> from.classpath is
>
> "C:\temp\dp\util\bin;C:\temp\dp\util\stack"
>
> \1
>
> returns
>
> C:\temp\dp\util\
>
> but
>
> \2
>
> does not return anything.
>
> I want to get back
>
> "C:\temp\dp\util\;C:\temp\dp\util\stack"
>
>
> Thanks
> Stefan
> --
> View this message in context: http://www.nabble.com/ant-regex-tf3910621.html#a11088164
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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