Skip to content

Do not use the leading .* shortcut in a backward search - #19643

Merged
mame merged 1 commit into
ruby:masterfrom
mame:regexp-rindex-anychar-star
Nov 9, 2026
Merged

mame merged 1 commit into
ruby:masterfrom
mame:regexp-rindex-anychar-star

Conversation

@mame

@mame mame commented Nov 2, 2026

Copy link
Copy Markdown
Member

A match at an earlier position does not imply one at the start position, so String#rindex with /.*.../m missed matches.

[Bug #22492]

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

This pull request references the following Redmine tickets:

A match at an earlier position does not imply one at the start position, so String#rindex with /.*.../m missed matches.

[Bug #22492]
@mame
mame force-pushed the regexp-rindex-anychar-star branch from e5cb463 to 6cc78fe Compare November 2, 2026 12:58
@mame
mame merged commit d55b67d into ruby:master Nov 9, 2026
146 of 147 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants