Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Awk > number of inter...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 2233 of 2236
Post > Topic >>

number of interval expression matches as argument

by paklet@[EMAIL PROTECTED] May 10, 2008 at 08:07 PM

Hi,

is there a way to pass the number of matches for an interval
expression as argument to to a function like this?

function foo (string, num) {
      sub(/([A-Z]* *){num}/,"",string)
      return string
}

bar="this is my string"
bla=for(bar, 2)

I'm using GNU Awk 3.1.5 and the  --re-interval switch, but I can not
get $num expanded to "2", I tried num and $num but it looks like I'm
to numb.

Kind Regards
Sirko




 4 Posts in Topic:
number of interval expression matches as argument
paklet@[EMAIL PROTECTED]   2008-05-10 20:07:44 
Re: number of interval expression matches as argument
Ed Morton <morton@[EMA  2008-05-10 22:33:25 
Re: number of interval expression matches as argument
paklet@[EMAIL PROTECTED]   2008-05-10 22:15:10 
Re: number of interval expression matches as argument
Ed Morton <morton@[EMA  2008-05-11 08:10:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 1:24:55 CDT 2008.