is Letter Digit Or Chinese by regex - Android java.util.regex

Android examples for java.util.regex:Phone Number Pattern

Description

is Letter Digit Or Chinese by regex

Demo Code


//package com.java2s;

public class Main {

    public static boolean isLetterDigitOrChinese(String str) {
        String regex = "^[a-z0-9A-Z\u4e00-\u9fa5]+$";
        return str.matches(regex);
    }/*from   w w w . j a  v a 2  s  . co  m*/
}

Related Tutorials