Regexp: combination of * and {,} results in incorrect matches
-------------------------------------------------------------

                 Key: JRUBY-4942
                 URL: http://jira.codehaus.org/browse/JRUBY-4942
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.5.1
         Environment: github trunk
            Reporter: Hiro Asari


As reported in http://old.nabble.com/forum/ViewPost.jtp?post=29179901&framed=y 
combining {{*}} and {{{,}}} results in incorrect matches.

{noformat}
irb(main):017:0> m=/([a-z]\s*?){5,}/.match "ab   "
=> #<MatchData "ab   " 1:"b   ">
irb(main):026:0> m=/([a-z]\s*){2,}/.match "ab d "
=> #<MatchData "ab d " 1:"d ">
irb(main):027:0> m=/([a-z]\s*?){2,}/.match "ab d "
=> #<MatchData "ab" 1:"b">
{noformat}

These are not tested in Joni.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to