From: Ravi Singh Date: 2007-05-05T08:45:58+09:00 Subject: Re: Regular expression - first two alphabets of a string Robert Klemme wrote: > On 03.05.2007 20:30, Rick DeNatale wrote: >>> On 5/3/07, Ravi Singh wrote: >>> > "axyz" - is fine >> irb(main):004:0> "a yz".match(re) >> => # > > What exactly do you gain by using lookahead instead of a normal match? > > Kind regards > > robert When Rick directed me to use -ve lookahead I reach the following page and it made the point clear. http://www.regular-expressions.info/lookaround.html Regards, -- Posted via http://www.ruby-forum.com/.