fixed regexp check