[ruby-core:115924] [Ruby master Bug#20095] Regex lookahead behaving strangely in 3.3.0

Issue #20095 has been reported by sisyphus_cg (Sisyphus CG). ---------------------------------------- Bug #20095: Regex lookahead behaving strangely in 3.3.0 https://bugs.ruby-lang.org/issues/20095 * Author: sisyphus_cg (Sisyphus CG) * Status: Open * Priority: Normal * ruby -v: 3.3.0 * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- 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/

Issue #20095 has been updated by dentarg (Patrik Ragnarsson). Same as https://bugs.ruby-lang.org/issues/20083? ---------------------------------------- Bug #20095: Regex lookahead behaving strangely in 3.3.0 https://bugs.ruby-lang.org/issues/20095#change-105919 * Author: sisyphus_cg (Sisyphus CG) * Status: Open * Priority: Normal * ruby -v: 3.3.0 * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- 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/

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/

Issue #20095 has been updated by duerst (Martin Dürst). Status changed from Open to Closed If the duplicate has already be resolved, then let's close this, too. ---------------------------------------- Bug #20095: Regex lookahead behaving strangely in 3.3.0 https://bugs.ruby-lang.org/issues/20095#change-106509 * Author: sisyphus_cg (Sisyphus CG) * Status: Closed * 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/

Issue #20095 has been updated by naruse (Yui NARUSE). Backport changed from 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED to 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE ruby_3_3 commit:5f3dfa1c273c6fb9eae65ceca633b46f7e30f686. ---------------------------------------- Bug #20095: Regex lookahead behaving strangely in 3.3.0 https://bugs.ruby-lang.org/issues/20095#change-107396 * Author: sisyphus_cg (Sisyphus CG) * Status: Closed * ruby -v: 3.3.0 * Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE ---------------------------------------- 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/
participants (5)
-
dentarg (Patrik Ragnarsson)
-
duerst
-
make_now_just (Hiroya Fujinami)
-
naruse (Yui NARUSE)
-
sisyphus_cg (Sisyphus CG)