Fix regexp in sed expression used by --auto option