ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tibor Strausz <Tibor.Stra...@tridion.com>
Subject RE: replaceregexp remove line
Date Fri, 16 Aug 2002 13:51:15 GMT
mmm
i noticed that perl 5 has the same behavior

tibi

> -----Original Message-----
> From: Jonathan Shipley [mailto:js@nomensa.com]
> Sent: Friday, August 16, 2002 3:25 PM
> To: Ant Users List
> Subject: RE: replaceregexp remove line
> 
> 
> I don't think it is greedy with newlines.
> 
> you could use the s flag:
> 	   <replaceregexp file="style/Document.txt"
>                              match="def.*"
>                              replace=""
>                              byline="false"
> 			     	flags="s"/>
> 
> this seems to work.
> 
> --
> Jonathan Shipley
> 
> 
> -----Original Message-----
> From: Tibor Strausz [mailto:Tibor.Strausz@tridion.com]
> Sent: 16 August 2002 14:08
> To: 'Ant Users List'
> Subject: RE: replaceregexp remove line
> 
> 
> if i do this
>    <replaceregexp file="Document.txt"
>                              match="def.*\n"
>                              replace=""
>                              byline="fasle" />
> 
> on this
> ---
> abc
> def
> geh
> ---
> i get
> ---
> abc
> geh
> ---
> but i expected the regexp to be gready  so that i would get
> ---
> abc
> ---
> 
> tibi
> 
> 
> 
> 
> ps emailing by my self but now  would like some input :-)
> 
> > -----Original Message-----
> > From: Tibor Strausz [mailto:Tibor.Strausz@tridion.com]
> > Sent: Friday, August 16, 2002 3:01 PM
> > To: 'Ant Users List'
> > Subject: RE: replaceregexp remove line
> >
> >
> > this works
> > :-)
> >     <replaceregexp file="${src}"
> >                              match="oldstuff\n"
> >                              replace=""
> >                              byline="fasle" />
> >
> > > -----Original Message-----
> > > From: Tibor Strausz [mailto:Tibor.Strausz@tridion.com]
> > > Sent: Friday, August 16, 2002 9:37 AM
> > > To: Ant Users List (E-mail)
> > > Subject: replaceregexp remove line
> > >
> > >
> > >
> > > can i remove a line using replaceregexp??
> > > <replaceregexp file="${src}"
> > > 	match="oldstuff\s*"
> > > 	replace="" />
> > > i still and up with an empty line
> > >
> > > tibi
> > >
> > >
> > > --
> > > 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>
> >
> 
> --
> 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>
> 

--
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