ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EXT / FOCAL MALAPRADE Roland <ext.focal.malapr...@sncf.fr>
Subject RE: Using ReplaceRegExp
Date Tue, 24 Sep 2002 16:29:44 GMT
Thanks for that. now I wanted to add a value at the end

<replaceregexp file="temptest.csv" match="(.);$" replace="\1<a value>"
               byline="true" />

now if i put replace="\100" to add a '00' (reusing the result '\1'), it
doesn't work.
How can I declare that 00 ?

Roland.

-----Message d'origine-----
De : Stefan Bodewig [mailto:bodewig@apache.org]
Envoye : lundi 23 septembre 2002 13:23
A : ant-user@jakarta.apache.org
Objet : Re: Using ReplaceRegExp


On Mon, 23 Sep 2002, <ext.focal.malaprade@sncf.fr> wrote:

> I'm trying to use <replaceregexp> to process csv files to remove
> semi-colons at the end of each line.

Untested:

<replaceregexp file="temptest.csv" match=";$" replace=""
               byline="true" />

If you want to reuse the result of a mtach like this one indicates

> <replaceregexp file="temptest.csv" match=".;$" replace="\1$"
> byline="true" />

you need to use parens like in

<replaceregexp file="temptest.csv" match="(.);$" replace="\1$"
               byline="true" />

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message