Java QQ Number Check isQq(String str)

Here you can find the source of isQq(String str)

Description

is Qq

License

Apache License

Declaration

public static boolean isQq(String str) 

Method Source Code


//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();
    }
}

Related

  1. isQQ(String qq)
  2. isQQ(String qq)
  3. isQQ(String str)