$s =~ /anchor/p and $s = ${^MATCH} . ${^POSTMATCH}; [download]
In reply to Re: Regex style and efficiency by JavaFan in thread Regex style and efficiency by bobf