Bug #1661
closedRegExp mismatch
Description
=begin
#---------------------------
if matches = "all ".match(Regexp.new("^((all)|(submit)|(view))\s\s*",Regexp::EXTENDED|Regexp::IGNORECASE))
print "Match\n#{matches.to_a.join("\n\t")}"
else
print "no match\n"
end
#---------------------------
prints "Match...", but
#---------------------------
if matches = "all 1".match(Regexp.new("^((all)|(submit)|(view))\s\s*1",Regexp::EXTENDED|Regexp::IGNORECASE))
print "Match\n#{matches.to_a.join("\n\t")}"
else
print "no match\n"
end
#---------------------------
prints "no match". Note that the differences is the addition of a '1' to the end of both the regular expression and the string. The same thing happens if I add '\d' instead of 1.
I know I'm using an old version. Possibly it's already fixed. Also, I didn't search for existing bugs because I couldn't figure out how to search by keyword on redmine.ruby-lang.org. Sorry if this is a dup.
=end