ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry V. Streepy, Jr." <stre...@healthlanguage.com>
Subject Re: regexp-mapper and windows directories
Date Wed, 20 Jun 2001 14:50:19 GMT
My guess is that the property substitution is happening when the string
is parsed from the build.xml file.  This turns it into a single '\'
which is an escape character in a regular expression.  You'll need to
setup some conditional targets that set the proper string to use, just
${file.separator} on Unix and "${file.separator}${file.separator}" on
Windows.

See if that works.

Rob van Oostrum wrote:
> 
> aren't you supposed to escape the $ in regexps? so you would have to put
> $${propname}
> 
> Alex Gugel wrote:
> 
> > > use ${file.separator} instead of /.
> > >
> > >Stefan
> >
> > Thank you. But I encountered some errors:
> >
> > 1.) <mapper type="regexp" from="^.*${file.separator}build(.*)$$"
> > to="\1"/> does not work.
> >
> > and
> >
> > 2.) If $(file.seperator} is followed by (.*) like
> >
> > <mapper type="regexp" from="^.*${file.separator}(.*)$$" to="\1"/>
> >
> > then I got:
> >
> > C:\cygwin\home\administrator\cvs\Curiavant\CUT02\build.xml:176:
> > org.apache.regexp.RESyntaxException: Syntax error: Unmat
> > ched close paren
> > --- Nested Exception ---
> > org.apache.regexp.RESyntaxException: Syntax error: Unmatched close paren
> > ...
> >         at org.apache.tools.ant.Main.main(Main.java:149)
> >
> > Must I escape ${file.separator} in some way? Or what else is wrong?
> >
> > alex

-- 
Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office)           mailto:streepy@healthlanguage.com
970/626-4425 (fax)              http://www.healthlanguage.com

Mime
View raw message