You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Lou Fox <lo...@cloud9.net> on 2002/06/18 18:19:12 UTC

trouble with replaceregexp

I would like to remove lines from a log file.  I'm able to remove all the
text from lines that match my regex, however the an empty line remains for
each of these matches.

I'm using jdk1.4.0, and in my CLASSPATH I has
D:\java\jakarta-oro-2.0.6\jakarta-oro-2.0.6.jar

 <replaceregexp
   byline="true"
   flags="i,s"
   match="^.*\.(gif|jpg|js|ram)\^.*"
   replace="">
   <fileset refid="unzippedfiles" />
  </replaceregexp>

Any suggestions?

P.S. I also had a lot of trouble using doing negation searches.  For
example, I was originally trying:
^.*\.[^(process|tem|htm|html)]\^.*$

By a process of elimination I found that once [] was added, the results
matches didn't seem to make sense.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>