ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tara Hernandez <t...@bluemartini.com>
Subject Re: Using " in replaceregexp
Date Fri, 09 Aug 2002 19:04:05 GMT
Darnit.  I hate when the mail goes off without me finishing.

What I was going to say was:

So I restructured the replaceregexp call to be inline, using 'match' and 'replace',
which doesn't fail, but then it doesn't actually do anything to the file.

Also, the server holding the Regexp FAQ on the Jakarta site is giving me connection
refused errors when I try to peruse.  Anybody know somebody who can kick it?

Tara Hernandez wrote:

> You are godlike.  That solved my quote problem, but now I'm seeing weird things
> like: "attribute 'expression' not supported for <regexp>", though that's how the
> docs say I'm supposed to do it.  The docs also say "use jakarta ORO", but maybe
> people have found a better library?
>
> Dominique Devienne wrote:
>
> > You can't escape quote in XML like that. Try replacing your \" by &quot;
> >
> > --DD
> >
> > -----Original Message-----
> > From: Tara Hernandez [mailto:tara@bluemartini.com]
> > Sent: Friday, August 09, 2002 1:41 PM
> > To: Ant Users List
> > Subject: Re: Using " in replaceregexp
> >
> > Er: error is:
> >
> > BUILD FAILED
> > file:E:/a20/modules/analytics/build.xml:272: Element type "replaceregexp"
> > must
> > be followed by either
> >  attribute specifications, ">" or "/>".
> >
> > Tara Hernandez wrote:
> >
> > > 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\""/>
> > > </replaceregexp>
> > >
> > > -Tara
> > >
> > > --
> > > "I was gratified to be able to answer promptly, and I did.  I said I
> > > didn't know"
> > >
> > >         -Mark Twain
> > >
> > > --
> > > To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> >
> > --
> > "I was gratified to be able to answer promptly, and I did.  I said I didn't
> > know"
> >
> >         -Mark Twain
> >
> > --
> > To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
> --
> "I was gratified to be able to answer promptly, and I did.  I said I didn't
> know"
>
>         -Mark Twain
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

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

        -Mark Twain



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


Mime
View raw message