Class NetworkUtils


  • public class NetworkUtils
    extends Object
    Author:
    Stuart Douglas, baranowb
    • Field Detail

      • IP6_EXACT

        public static final String IP6_EXACT
        IPV6 match. ?: - unnamed groups are used for performance reasons. Requirements: - match full or partial IPV6 ( sliding '::') - match end to start - ^$ to ensure it does not match part of some random (\d:){n,m} - IPv4-Embedded IPv6 Address NO: - IPv4 mapped/translated into IPv6 ^(?:([0-9a-fA-F]{1,4}:){7,7}(?:[0-9a-fA-F]){1,4} - full address |(?:([0-9a-fA-F]{1,4}:)){1,7}(?:(:)) - last compressed |(?:([0-9a-fA-F]{1,4}:)){1,6}(?:(:[0-9a-fA-F]){1,4}) - second to last |(?:([0-9a-fA-F]{1,4}:)){1,5}(?:(:[0-9a-fA-F]{1,4})){1,2} - etc |(?:([0-9a-fA-F]{1,4}:)){1,4}(?:(:[0-9a-fA-F]{1,4})){1,3} |(?:([0-9a-fA-F]{1,4}:)){1,3}(?:(:[0-9a-fA-F]{1,4})){1,4} |(?:([0-9a-fA-F]{1,4}:)){1,2}(?:(:[0-9a-fA-F]{1,4})){1,5} |(?:([0-9a-fA-F]{1,4}:))(?:(:[0-9a-fA-F]{1,4})){1,6} |(?:(:))(?:((:[0-9a-fA-F]{1,4}){1,7}|(?:(:)))))$ - all the way compressed
        See Also:
        Constant Field Values