ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tara Hernandez <>
Subject Using " in replaceregexp
Date Fri, 09 Aug 2002 18:36:28 GMT
I'm trying to  find the last line of a structure, append a "," then add
a new line.  This code is largely replicated from a java class that also
uses an ORO jar (though not the jakarta one) to do the same thing, so I
was hoping it would be a pretty easy conversion.

However, Ant blows chunks if I try to use quotes as part of the
expression itself.  I've tried various methods of escaping them to no
luck.  Anybody have any ideas?

 <replaceregexp file="${basedir}/config/env.dna">
      <regexp expression="\"WEBSTORE_SERVER\" String \"(.*)\"$"/>
      <substitution expression="\"WEBSTORE_SERVER\" String \"$1\",\n
\"NEW_ENV\" String \"new_env.dna\""/>


"I was gratified to be able to answer promptly, and I did.  I said I
didn't know"

        -Mark Twain

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message