From: Ammar Ali Date: 2010-10-27T21:04:40+09:00 Subject: Re: Regular expression quirk? On Wed, Oct 27, 2010 at 2:58 PM, Robert Klemme wrote: > On Wed, Oct 27, 2010 at 1:38 PM, Ammar Ali wrote: >> On Wed, Oct 27, 2010 at 1:58 PM, Ammar Ali wrote: >>> On Wed, Oct 27, 2010 at 1:47 PM, Robert Klemme >>> wrote: >>>> On Wed, Oct 27, 2010 at 12:44 PM, Ammar Ali wrote: >>>>> AFAIK, there are no possessive quantifiers in 1.9, >>>> >>>> You are misinformed.  Where did you get that information?  Please see: >>>> >>>> http://www.geocities.jp/kosako3/oniguruma/doc/RE.txt >> >> One more thing, Read Ruby >> (http://ruby.runpaint.org/regexps#quantifiers) doesn't even mention >> possessive quantifiers. Hmmm. >> >> Not everything in Oniguruma is supported in ruby. I guess I need to >> verify this further. > > irb(main):001:0> /a+a/ =~ "aaa" > => 0 > irb(main):002:0> /a++a/ =~ "aaa" > => nil > > What else do you need to verify? I ran similar tests and they work as expected from possessives, so I'm sure they are supported. I would like to see it clearly stated in ruby documentation. I logged an issue about it for Read Ruby http://github.com/runpaint/read-ruby/issues#issue/74 Thanks again, Ammar