ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Vromans CPWR <>
Subject Re: backslash and CRLF in regular expression
Date Wed, 23 Jun 2004 10:27:30 GMT
Stefan Bodewig wrote:
>  Oh, and I'd probably use ${line.separator}
> instead of &#13;&#10; for easier portability.

Dangerous. If I would have a hypothetical line.separator that is a 
literal backslash, the pattern would require \\, not ${line.separator} 
which is only a single \.

Yes, I agree, that for ordinary cases like \r and \n it should not 
matter. But in general it is dangerous to expect a literal string 
expansion in a pattern to match itself.

-- Johan

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message