Issue #557 has been updated by Shyouhei Urabe.

Status changed from Open to Closed

Not a bug. Leftmost match is preferred.

% echo 'footer' | perl -pe 's/foo|footer/($&)/;'
(foo)ter

----------------------------------------
http://redmine.ruby-lang.org/issues/show/557

----------------------------------------
http://redmine.ruby-lang.org