Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 72234 invoked from network); 26 Sep 2002 15:44:47 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 26 Sep 2002 15:44:47 -0000 Received: (qmail 13550 invoked by uid 97); 26 Sep 2002 15:45:13 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 13495 invoked by uid 97); 26 Sep 2002 15:45:12 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 13479 invoked by uid 98); 26 Sep 2002 15:45:11 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <5DDFCC127CEED211A27200105A9CAB7B0142D7ED@S64P10BM756> From: EXT / FOCAL MALAPRADE Roland To: "'Ant Users List'" Subject: RE: Using ReplaceRegExp Date: Thu, 26 Sep 2002 16:04:38 +0200 MIME-Version: 1.0 Content-Type: text/plain Organization: S.N.C.F. French Railways X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N okay that was actually the first thing I'd tried. later I used this: This worked fine (it removed the 31rst semi-colon from each line). Then I wanted to add 00 if the 31rst column of my CSV file was missing, so I think I tried (sorry I deleted it) : now if I put replace="\1'00'", it added '00' to the end of each line where the 32rst column was missing, but I didn't want the single quotes, but with just \100 (as in \1 and 00), it didn't work. I supposed it interpreted it as "give me the 100th result". Now I read somewhere that you could match a caracter by using it's octal value as \nnn, or its hexadecimal value with \x, but this is supposedly for matching, and not for the replacement. As i don't know much about regular expressions, it's got me beat. Any ideas? Roland. -----Message d'origine----- De : Stefan Bodewig [mailto:bodewig@apache.org] Envoye : jeudi 26 septembre 2002 15:42 A : ant-user@jakarta.apache.org Objet : Re: Using ReplaceRegExp On Tue, 24 Sep 2002, wrote: > Thanks for that. now I wanted to add a value at the end > > replace="\1" byline="true" /> > > now if i put replace="\100" to add a '00' (reusing the result '\1'), > it doesn't work. What is the result? \1 will only match the very last character of the line (in front of the ";"), you probably want to use (.*) instead. Stefan -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: