fixed regex to detect centos and redhat