From: "make_now_just (Hiroya Fujinami) via ruby-core" Date: 2024-01-29T14:03:24+00:00 Subject: [ruby-core:116477] [Ruby master Bug#20095] Regex lookahead behaving strangely in 3.3.0 Issue #20095 has been updated by make_now_just (Hiroya Fujinami). It is the exact same as #20207. ---------------------------------------- Bug #20095: Regex lookahead behaving strangely in 3.3.0 https://bugs.ruby-lang.org/issues/20095#change-106499 * Author: sisyphus_cg (Sisyphus CG) * Status: Open * Priority: Normal * ruby -v: 3.3.0 * Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED ---------------------------------------- Multiple regex lookaheads seem to behave strangely in 3.3.0: ```ruby p "xxx" =~ /(?=.*x)x(?=banana)/ # 2 ``` Clearly, the string `xxx` does not contain `banana`, so this regex should never match, but it does. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/