Generalized regular expression for determining whether the parsed address is an IP or not