Skip to content

Instantly share code, notes, and snippets.

import java.net.*;
import java.util.*;
import java.util.Enumeration;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
class InetAddressTest
{
private static final String IPADDRESS_PATTERN =
"^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." +