Here you can find the source of isQq(String str)
public static boolean isQq(String str)
//package com.java2s; //License from project: Apache License import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean isQq(String str) { boolean result = validByRegex("^[1-9]\\d{4,9}$", str); return result; }/*from w ww . j av a2 s.co m*/ public static boolean validByRegex(String regex, String str) { Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE); Matcher regexMatcher = pattern.matcher(str); return regexMatcher.find(); } }