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 Using ReplaceRegExp
Date Mon, 23 Sep 2002 10:03:49 GMT
Hi everybody,

nicely rested from the weekend ? I'm not :)

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

I don't know if this is off-topic, but i'll have to admit that i'm a total
newbie to regular expressions, and if anyone has already had to do something
like this, could the point me to a solution

Now I tried :

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

which (obviously?) didn't work.

I basically want to turn each line like this :

hello;1.0;AZ;10;

into

hello;1.0;AZ;10  ( <- no semi-colon )

the csv file has 31 "columns", so I suppose the pattern will have {30} or
{31} in it, but I really don't know what to put in it.

Can anybody help?

Roland.

--
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