On 18/01/12 17:46, Nehal Patel wrote:
Nice, this was the solution!
Frankly this is a bit more advanced that i know.
I don't know the following:
What the "^" means.
What the "$" means.
What the "\1" means.
All you want to know about regular expressions and even more:
http://www.regular-expr
: Harold Putman [mailto:hput...@lexmark.com]
Sent: 18 January 2012 19:51
To: Ant Users List
Subject: Re: Update property value in file and retaining format.
These are Regular Expression "metacharacters"
^ means start of line
$ means end of line
\1 is a "backreference" used i
These are Regular Expression "metacharacters"
^ means start of line
$ means end of line
\1 is a "backreference" used in substitution. It means insert the first
part of the pattern than matches.
If you Google or look up a book on Regular Expressions you will find more
complete explanations of thes
Nice, this was the solution!
Frankly this is a bit more advanced that i know.
I don't know the following:
What the "^" means.
What the "$" means.
What the "\1" means.
Thanks.
On Mon, Jan 16, 2012 at 4:38 AM, Emma Burrows wrote:
> You're replacing the entire "Test2=" line with the string
> "tes
You're replacing the entire "Test2=" line with the string
"test2=x" which obviously doesn't contain the tab characters.
You should probably investigate more sophisticated ways of preserving the
original tabs like
match="^([ \t]*test2[ \t]*=)(.*)$"
replace="\1xxx"
I haven't tested it bu