Hi everybody,

I would like to replace two lines by only one line in a file, for example,
change a file "notes.txt" with the following contents

first line
second line
third line
fourth line

to the contents

first line
second and third line
fourth line

I tried the <replace> task with

<replace file="notes.txt" value ="second and third line" >
          <replacetoken><![CDATA[second line 
third line]]></replacetoken> 
</replace>

and I also tried

<replace file="notes.txt" value ="second and third line" >
          <replacetoken><![CDATA[second line ${line.separator} third
line]]></replacetoken> 
</replace>


but nothing worked.  Any idea what I did wrong? I can imagine that the
specification of the line separator is not correct or that the declaration
of the token must be different.

Thanks in advance!

Regards,
Roger




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to