From: merch-redmine@... Date: 2019-09-09T23:49:29+00:00 Subject: [ruby-core:94879] [Ruby master Bug#16158] "st" Character Sequence In Regex Look-Behind Causes Illegal Pattern Error When Combined With POSIX Bracket Expressions And Case Insensitivity Flag Issue #16158 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Feedback I tried on Ruby 2.5.6 and was not able to reproduce: ``` $ irb25 irb(main):001:0> pat = /(? /(? pat = /(?i)(? /(?i)(? pat = /(? /(? RUBY_VERSION => "2.5.6" ``` Can you please try 2.5.6 and see if the problem has been fixed? ---------------------------------------- Bug #16158: "st" Character Sequence In Regex Look-Behind Causes Illegal Pattern Error When Combined With POSIX Bracket Expressions And Case Insensitivity Flag https://bugs.ruby-lang.org/issues/16158#change-81495 * Author: michaeltomko (Michael Tomko) * Status: Feedback * Priority: Normal * Assignee: * Target version: * ruby -v: 2.5.0, 2.5.3 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- *This is my first Ruby bug submission. Please let me know if there is anything else that I can provide that would be helpful. Thanks for your time!* I've tried just about as many combinations as I can think of and I have been able to narrow down the issue to the following components being present in a regular expression. * The character sequence "st" either preceded by any characters OR being a part of a top-level alternation inside of a look-behind. The issue occurs with both positive and negative look-behinds. ex: `(? pat = /(? pat = /(?i)(? pat = /(? pat = /((? /((? pat = /((? /((? pat = /((? /((? pat = /(? /(? pat = /(? /(?