You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Nagarajan Murugesan <NM...@Selectica.com> on 2003/12/11 14:23:07 UTC

Problem with the replaceregexp task!!!

Hi All,

I have the problem with using <replaceregexp> task.

I have written a task to replace a new line character
in a text file. once it get exceuted, i opened in a 
notepad(by default), it contains small rectangle kind
of character before the replacement string.

How could i remove this junk character from the file.
please help me on this.

Here is my code:

<replaceregexp file="C:/runant.txt" match="\n" replace=","  flags="g" />

Thanks,
Nagarajan M



AW: Problem with the replaceregexp task!!!

Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Hi Nagarajan,
<replaceregexp file="C:/runant.txt" match="\r\n" replace=","  flags="g" />

Will be better,
Cheers,
Antoine

-----Ursprüngliche Nachricht-----
Von: Nagarajan Murugesan [mailto:NMURUGESAN@Selectica.com]
Gesendet: Donnerstag, 11. Dezember 2003 14:23
An: 'Ant Users List'
Betreff: Problem with the replaceregexp task!!!



Hi All,

I have the problem with using <replaceregexp> task.

I have written a task to replace a new line character
in a text file. once it get exceuted, i opened in a
notepad(by default), it contains small rectangle kind
of character before the replacement string.

How could i remove this junk character from the file.
please help me on this.

Here is my code:

<replaceregexp file="C:/runant.txt" match="\n" replace=","  flags="g" />

Thanks,
Nagarajan M




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