Answers for "java regular expressions ip address"

1

java ip regex pattern

String pattern = "([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])";
Posted by: Guest on September-23-2020
0

java regex ip

public static boolean isIP(String ip)  {
    Pattern p = Pattern.compile("(([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\\.){3}([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])");
    Matcher m = p.matcher(ip);
    return m.matches();
}
Posted by: Guest on November-09-2020

Code answers related to "java regular expressions ip address"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language