Java IP Address Validate isIPv6HexCompressedAddress(final String input)

Here you can find the source of isIPv6HexCompressedAddress(final String input)

Description

is I Pv Hex Compressed Address

License

Open Source License

Declaration

public static boolean isIPv6HexCompressedAddress(final String input) 

Method Source Code


//package com.java2s;
import java.util.regex.Pattern;

public class Main {
    private static final Pattern IPV6_HEX_COMPRESSED_PATTERN = Pattern.compile(
            "^((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)::((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)$");

    public static boolean isIPv6HexCompressedAddress(final String input) {
        return IPV6_HEX_COMPRESSED_PATTERN.matcher(input).matches();
    }/*from  w  w w  .j  a va 2  s .  c  o  m*/
}

Related

  1. isIpV6Address(CharSequence address)
  2. isIPv6Address(final String input)
  3. isIPv6Address(final String input)
  4. isIPv6Address(String _ipAddress)
  5. isIPv6HexCompressedAddress(final String input)
  6. isIPv6HexCompressedAddress(String ip)
  7. isIPv6LiteralAddress(String src)
  8. isIpV6RegexValid(String strIp)
  9. isIPv6StdAddress(final String input)