public static boolean IPisCorrect(String ip) {
Pattern p = Pattern
.compile("^(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])$");
Matcher m = p.matcher(ip);
boolean b = m.matches();
return b;
}
public static boolean IPisCorrect(String ip) {
Pattern p = Pattern
.compile("^(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])$");
Matcher m = p.matcher(ip);
boolean b = m.matches();
return b;
}