private static boolean isIPv4(String host) {
    String regex = "\\d{1,3}.\\d{1,3}.\\d{1,3}.\\d{1,3}";

    return host.matches(regex);
  }
Checks if the given host name is actually a String representation of an IPv4 address.

@param host host name string
@return true if given host name is a String representation of an IPv4 address, false otherwise
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MemberInfoWithStatsMBean.java