RE: regular expressions in Ant

2008-03-24 Thread Vallon, Justin
[\] is open-character-class right-bracket. The exception is that you are missing a ']', making the pattern [\]] - matching a single right-bracket. You mean [\\], or more simply \\. To turn backslash into double backslash, try: regexp="\\" replace="" -Original Message-

Re: regular expressions in Ant

2008-03-24 Thread Olivier Gies
Backslashes in Ant need to be escaped, as in any regular Java String: BR, Olivier Original Message Subject: Re: regular expressions in Ant From: Z W <[EMAIL PROTECTED]> To: Ant Users List Date: 25/03/2008 08:35 I updated with removal of ( from ([\] and still get t

Re: regular expressions in Ant

2008-03-24 Thread Z W
I updated with removal of ( from ([\] and still get the same error about java.util.regex.PatternSyntaxException: Unclosed character class near index 2 [\] ^ On Mon, Mar 24, 2008 at 5:24 PM, Z W <[EMAIL PROTECTED]> wrote: > Hi > > I have trouble converting \ to \\, for example in > \\filer\Test

regular expressions in Ant

2008-03-24 Thread Z W
Hi I have trouble converting \ to \\, for example in \\filer\Test\PaC\M2\5.3, to filer\\Test\\PaC\\M2\\5.3. I tried with ant-contrib's But I get errors C:\main.xml:452: java.util.regex.PatternSyntaxException: Unclosed character class near index 3 ([\] ^ Thanks for sharing --