ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: Which Class.method Does Ant Use to Strip Out \ and /
Date Tue, 24 Oct 2006 18:55:39 GMT
underneath the covers Ant implements the reg-exp parser using the underlying Java Regular
Expression Pattern as defined here
Note what they say about the backslash character '\'
Backslashes, escapes, and quoting 
The backslash character ('\') serves to introduce escaped constructs, as defined in the table
above, as well as to quote characters that otherwise would be interpreted as unescaped constructs.
Thus the expression \\ matches a single backslash and \{ matches a left brace. 

It is an error to use a backslash prior to any alphabetic character that does not denote an
escaped construct; these are reserved for future extensions to the regular-expression language.
A backslash may be used prior to a non-alphabetic character regardless of whether that character
is part of an unescaped construct. 


This e-mail communication and any attachments may contain confidential and privileged information
for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified
that you have received
this communication in error and that any review, disclosure, dissemination, distribution or
copying of it or its 
----- Original Message ----- 
From: "Dominique Devienne" <>
To: "Ant Users List" <>
Sent: Tuesday, October 24, 2006 1:39 PM
Subject: Re: Which Class.method Does Ant Use to Strip Out \ and /

> On 10/24/06, Robert Pepersack <> wrote:
>> Does anyone know which method in which class Ant uses to strip out
>> slashes and back-slashes?  I would like to see if I can reuse it in my
>> own custom task.
> You may want to look at FileUtils, and methods with normalize in their
> name, and also Project#resolveFile. --DD
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
View raw message