ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Woodchuck <woodchuc...@yahoo.com>
Subject RE: <replaceregexp> to wipe out everything in a file
Date Thu, 17 Jun 2004 16:52:08 GMT
perfect!!  my files are 0 bytes in size now!!
thanks!!

<replaceregexp flags="s">
  <regexp pattern=".*"/>
  <substitution expression=""/>
  ..
</replaceregexp>


--- "Anderson, Kajsa (TLR Corp)"
<Kajsa.Anderson@thomson.com> wrote:
> Have you tried the singleline flag?
> 
> From the manual:
> The flags to use when matching the regular
> expression. For more information, consult the Perl5
> syntax
> s : Singleline. Treat the string as a single line of
> input, using "." to match any character, including a
> newline, which normally, it would not match.
> 
> -----Original Message-----
> From: Woodchuck [mailto:woodchuck_5@yahoo.com]
> Sent: Thursday, June 17, 2004 10:41 AM
> To: user@ant.apache.org
> Subject: <replaceregexp> to wipe out everything in a
> file
> 
> 
> is there a way to wipe out an entire file?
> i just want everything to be blank.
> 
> i used the following:
> 
> <replaceregexp byline="true">
>   <regexp pattern="(.*)"/>
>   <substitution expression=""/>
> 
> now i have a blank empty file, but there are still
> many lines (carriage returns) in that file.
> 
> i want to eliminate *everything* so that the only
> thing in the file is EOF character, no line returns,
> no nothing at all.
> 
> does anyone know how to do this?
> 
> i tried setting byline=false but it didn't work
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
> 
>
---------------------------------------------------------------------
> 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
> 
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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


Mime
View raw message