public static String convertIpv4WildcardRangeToCidrNotation(final @Nonnull String value)
    {
        return value.replace(".*.*.*", ".0.0.0/8")
                    .replace(".*.*", ".0.0/16")
                    .replace(".*", ".0/24");
    }
Replaces a representation of an IPv4 network range that is using wildcards (eg: <tt>192.*.*.*</tt>) with a
notation that is CIDR-based (eg: <tt>192.0.0.0/8</tt>).

When the string cannot be transformed, the original string is returned.

@param value The network range to transform
@return The transformed range.
xmppserver/src/main/java/org/jivesoftware/util/IpUtils.java