package com.cy.report.test; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.cy.report.utils.RegularUtil; public class regularTest { /** * @param args */ public static void main(String[] args) { // String s = "http://www.c/"; // String s1 = "燕"; //// String regular = "^[A-Za-z]+$"; //// String regular = "^[A-Za-z0-9\u4E00-\u9FA5._-]+$"; //// String regular = "^[u4e00-u9fa5],{0,}$"; // String regular = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"; // Pattern pat = Pattern.compile(regular); // Matcher mat = pat.matcher(s); // //System.out.println(mat.find()); // // //System.out.println(s.matches(regular)); System.out.println(RegularUtil.regularECNPL("1111111111111111111")); // System.out.println(RegularUtil.regularURL(s)); // String testStr = "s1A!43"; // System.out.println(testStr.matches(".*?[^a-zA-Z\\d]+.*?") // && testStr.matches(".*?[a-z]+.*?") // && testStr.matches(".*?[A-Z]+.*?") // && testStr.matches(".*?[\\d]+.*?") // && testStr.matches("^.{6,16}$")); } }