Test whether --perl-regexp works and fall back to --extended-regexp if not.