Java Regex

  • + 0 comments

    class MyRegex {

       String pat = "(\\b\\d\\b|\\b[1-9][1-9]\\b|\\b[0-1][0-9][0-9]\\b|\\b2[0-4][0-9]\\b|\\b25[0-5]\\b)";
       String pattern = "^"+pat+"\\."+pat+"\\."+pat+"\\."+pat+"$";
    

    }