ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Abley <james.ab...@volantis.com>
Subject RE: <replaceregexp>
Date Thu, 20 Oct 2005 13:55:07 GMT
On Thu, 2005-10-20 at 14:48, Mikael Petterson (KI/EAB) wrote:
> Hi,
> 
> I am not quite confident how you mean? Can you please show me? And what is the meaning
of
> 
> &#34;  
> 

Ant build files are in XML. &#34; is the XML character reference for the
double-quote character.

See http://skew.org/xml/tutorial/ for a reasonable description.

James

> 
> I tried the following:
> 
>  <target name="regexp_test">
>      <replaceregexp file="index.htm" match="^.*\( &#34;"CUSTOM_APPL_REV&#34;".*VALUE
=  &#34;"[A-Z0-9]&#34;"\)"   replace ="\1${product_number_html}\_${product_revision_html}"/>

>    </target>
> 
> but got on the line of my replaceregexp .-(
> 
> 
> BUILD FAILED
> /home/eraonel/netbeans_projects/countlines/bem.xml:25: Element type "replaceregexp" must
be followed by either attribute specifications, ">" or "/>".
>         at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:222)
>         at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:131)
>         at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
>         at org.apache.tools.ant.Main.runBuild(Main.java:658)
>         at org.apache.tools.ant.Main.startAnt(Main.java:188)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> 
> //mikael
> 
> -----Original Message-----
> From: Jakob Fix [mailto:jakob.fix@gmail.com]
> Sent: den 20 oktober 2005 15:32
> To: Ant Users List
> Subject: Re: <replaceregexp>
> 
> 
> Mikael,
> 
> 
> On 20/10/05, Mikael Petterson (KI/EAB) <mikael.petterson@ericsson.com> wrote:
> > Hi,
> >
> > I tried the following;
> >
> >  <replaceregexp file="index.htm" match="^.*\("CUSTO_APPL_REV".*VALUE = "[A-Z0-9]"\)"
  replace ="\1${product_number_html}\_${product_revision_html}"/>
> >
> > but the " seems to mess up the match.
> 
> use &#34; to escape double quote characters.
> 
> HTH
> 
> --
> cheers,
> Jakob.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

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


Mime
View raw message