Actions
Bug #14838
openRegexpError with double "s" in look-behind assertion in case-insensitive unicode regexp
Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
Description
irb(main):003:0> %r{(?<!bss>)}ui
Traceback (most recent call last):
1: from /usr/bin/irb:11:in `<main>'
SyntaxError ((irb):3: invalid pattern in look-behind: /(?<!bss>)/i)
The error goes away if you remove the "u" or "i" modifier. It comes back if you leave just the "i" modifier and then apply the regexp to a unicode string, since at that point the regexp gets converted to unicode.
See also the same bug in JRuby: https://github.com/jruby/jruby/issues/5086
And their fix: https://github.com/jruby/jruby/commit/a72224d8a010f162d797e79cf73c21e78c0d59a0
Actions
Like0
Like0Like0