Bug #3681
closedCharacter class abbreviations, + repetition notation and group backreferences issue in Regexp
Description
=begin
There seems to be a bug in Ruby 1.9.2 rc2 regarding Regular Expression
/([A-Z][a-z]+){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w+){2}/ =~ 'TestString' # => nil #should be 0
/(A-Z+){2}/ =~ 'TestString' # => 0 #correct
/(A-Z+){2}/ =~ 'TestString' # => nil #should be 0
/([A-Z]\w{1,10}){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w{1,}){2}/ =~ 'TestString' # => nil #should be 0
Ruby 1.9.1 p429 yields correct result
/([A-Z][a-z]+){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w+){2}/ =~ 'TestString' # => 0 #correct
/(A-Z+){2}/ =~ 'TestString' # => 0 #correct
/(A-Z+){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w{1,10}){2}/ =~ 'TestString' # => 0 #correct
/([A-Z]\w{1,}){2}/ =~ 'TestString' # => 0 #correct
=end