@headius, I must admit, I had never encountered \K either. I found this problem (and the one regarding \X) by testing diffs between Java and Ruby on Regular-Expressions.info. Most headings in that TOC links to a page where the compared flavors can be selected at the top. I found it to be quite helpful.
jruby-188.8.131.52 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
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.
\K does not match anything when using JRuby.
The text was updated successfully, but these errors were encountered: