From: sto.mar@... Date: 2012-09-06T05:28:01+09:00 Subject: Re: awk equivalent in ruby Am 05.09.2012 21:57, schrieb Ferdous ara: >> which '1' ??? > > i just need 1 thats it ??? and: what would you do in awk? >> - google for 'ruby regular expressions' > S> (especially capturing might be useful) > > I am reading in google. but very new in ruby .. > so bit confused .. , > if you can give me some example that would be good > Thanks 1.9.3-p194 :001 > string = 'a string with 27 characters' => "a string with 27 characters" 1.9.3-p194 :002 > /(?\d+) characters/ =~ string => 14 1.9.3-p194 :003 > number => "27" see look for 'named capture groups' --