ant-regexp

D

david

I would like to use the following regexp:
<replaceregexp flags="g" match="\n\[\s&&[^\n]]+" replace="\\\\n">
<fileset dir="/home/public/dbs/regexp"
includes="applicationLogMessages.properties"/>
</replaceregexp>

unfortunately, eclipse marks this as an error as soon as i type a "&".

my goal is to replace all NEWLINEs where the new line starts with a
WHITESPACE with a \n, but keep it on the same line.
if the next line is empty(simply a NEWLINE) i want to do nothing!

how can i achieve this (without using &)?

thankful for all hints.
david
 
M

Michael Borgwardt

david said:
I would like to use the following regexp:
<replaceregexp flags="g" match="\n\[\s&&[^\n]]+" replace="\\\\n">
<fileset dir="/home/public/dbs/regexp"
includes="applicationLogMessages.properties"/>
</replaceregexp>

unfortunately, eclipse marks this as an error as soon as i type a "&".

Ant scripts are XML, and & must be escaped with an entity &amp; in XML.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top