From: Yui NARUSE Date: 2010-06-07T16:00:57+09:00 Subject: [ruby-core:30633] [Backport #3402] A bug related to ruby's regular expression!!!!!! Backport #3402: A bug related to ruby's regular expression!!!!!! http://redmine.ruby-lang.org/issues/show/3402 Author: Yui NARUSE Status: Assigned, Priority: Normal Assigned to: Shyouhei Urabe, Category: core, Target version: Ruby 1.8.7 Backport r28192 I found a bug related to ruby's regular expression! puts(/wo{0,3}?/.match("woo")) This line of code should show a "w" on the screen, but my ruby shows "wo" on then screen. According to the principles of regular expression, this is a non-greedy match, so it should match 0 "o", but it matches at least 1 "o". I think this is a bug! I also tried this in the javascript language, it works well!("w" is shown) My ruby version is v1.8.7-p249. ---------------------------------------- http://redmine.ruby-lang.org