ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey E Care <ca...@us.ibm.com>
Subject Re: replaceregexp problem
Date Tue, 18 Oct 2005 17:54:09 GMT
Play around with the @flags & @byline; I think those will be able to solve 
your problem.

-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere v7 Release Engineer
WebSphere Build Tooling Lead (Project Mantis)


Gilbert Rebhan <ant@schillbaer.de> wrote on 10/18/2005 01:41:02 PM:

> Hi,
> 
> i want to change one line in a txtfile.
> 
> 1. if txtfile is like =
> 
> foo=bar
> bla=bla
> 
> <property name="insert" value="123456"></property>
> 
> <replaceregexp file="J:\test\bla.txt"
>  match="bla.*"
>  replace="\0:${insert}">
> </replaceregexp>
> 
> works as it should, gives me =
> 
> foo=bar
> bla=bla:123456
> 
> 2. but if txtfile is like =
> 
> foo=bar
> bla=bla
> foobar=foobar
> 
> means the line to be altered is not the last line
> 
> my snippet above gives me =
> 
> foo=bar
> bla=bla
> :123456
> foobar=foobar
> 
> What went wrong, how to get it right ?
> Any ideas ?
> 
> Regards, Gilbert
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message