in reply to grep regex exact match last n positions

You seem to want

/ \Q$search\E\z/