Skip to content

A regexp with \K doesn't work in JRuby #4871

@thallgren

Description

@thallgren

Environment

jruby-9.1.7.0 running on Linux 4.13.13-100.fc25.x86_64 #1 SMP Wed Nov 15 17:33:19 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Expected Behavior

The text matched by the part of the regex to the left of the \K is omitted from the overall regex match. Other than that the regex is matched normally from left to right.

$ irb
2.3.1 :001 > 'street'.match( /s\Kt/)
 => #<MatchData "t"> 

Actual Behavior

\K does not match anything when using JRuby.

$ irb
jruby-9.1.7.0 :001 > 'street'.match( /s\Kt/)
 => nil 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions