Re: Advanced Regexp Question

2012-01-08 Thread Scot P. Floess
I could be wrong, but my guess is he wants this first pass (I suppose because that's what I'd want)... The only problem with twice is...it doesn't address what happens if there is a third, fourth and fifth (and so on) references... On Sun, 8 Jan 2012, Andy Stevens wrote: On 6 Jan 2012 21:

Re: Advanced Regexp Question

2012-01-07 Thread Andy Stevens
On 6 Jan 2012 21:12, wrote: > Say I have a string in a file like this: > >require(["a","foo/b","foo/c"], function(){...}) > > What I want to do is replace all the "foo" with "bar" so the final product > looks like this: > >require(["a","bar/b","bar/c"], function(){...}) > > With re

Re: Advanced Regexp Question

2012-01-07 Thread Scot P. Floess
Greg, I've been looking at this for about an hour or so... I'm stumped too ;) On Fri, 6 Jan 2012, greg.zol...@aviall.com wrote: Hello, I am able to do some very simple regexp replacement with the replaceregexp ant task but now need to do something a little more advanced. Say I have a strin

Advanced Regexp Question

2012-01-06 Thread Greg . Zoller
Hello, I am able to do some very simple regexp replacement with the replaceregexp ant task but now need to do something a little more advanced. Say I have a string in a file like this: require(["a","foo/b","foo/c"], function(){...}) What I want to do is replace all the "foo" with "bar"

AW: AW: regexp question

2005-01-31 Thread Jan . Materne
your file and use concat for appending them. Jan > -Ursprüngliche Nachricht- > Von: Gilbert Rebhan [mailto:[EMAIL PROTECTED] > Gesendet am: Sonntag, 30. Januar 2005 13:59 > An: Ant Users List > Betreff: Re: AW: regexp question > > Hi, Jan > > thanks for

RE: regexp question

2005-01-31 Thread Rebhan, Gilbert
Hi, Jan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, January 28, 2005 12:48 PM To: user@ant.apache.org Subject: AW: regexp question Sorry if offtopic, seems to be a more javaspecific question. actually the value that has to be put in the file is

Re: regexp question

2005-01-30 Thread Gilbert Rebhan
Hi, Nat i considered concat ... already, but i felt like there would be a more elegant and shorter solution with regular expressions. I'm sure there's one, but i'm no expert for regexp. Gilbert Why not use concat with a filterchain/headfilter? Basically you read (with headfilter lines=25) the first

Re: regexp question

2005-01-30 Thread Nat Gross
Rebhan, Gilbert wrote: Hi, scenario = a txtfile where i have to put a value in. The line where that value should go is always line number 26 of that file. line number 26 is always blank and should contain the value after transformation. I've tried with :

Re: AW: regexp question

2005-01-30 Thread Gilbert Rebhan
Hi, Jan thanks for the task!! Works great, but one thing similar to the echo task = f.e. if i write : .. ..bla .. all the blanks (the '.') are echoed to the file if i write bla it's echoed without blanks. So when using your task i have to write the insert part all on one lin

AW: regexp question

2005-01-28 Thread Jan . Materne
tAfter(Integer.parseInt(args[2])); for(int i=3; i -Ursprüngliche Nachricht- > Von: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] > Gesendet am: Freitag, 28. Januar 2005 12:20 > An: user@ant.apache.org > Betreff: regexp question > > > Hi, > > scenario = a tx

regexp question

2005-01-28 Thread Rebhan, Gilbert
Hi, scenario = a txtfile where i have to put a value in. The line where that value should go is always line number 26 of that file. line number 26 is always blank and should contain the value after transformation. I've tried with :