Here you can find the source of isIPSect(String ip)
public static boolean isIPSect(String ip)
//package com.java2s; //License from project: Apache License import java.util.regex.Pattern; public class Main { public static boolean isIPSect(String ip) { return Pattern.compile( "^((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){2}((2[0-4]\\d|25[0-5]|[01]?\\d\\d?|\\*)\\.)(2[0-4]\\d|25[0-5]|[01]?\\d\\d?|\\*)$") .matcher(ip).find();//w w w . j a va 2 s.c om } }