Android examples for java.util.regex:Phone Number Pattern
is Letter Or Number by regex
//package com.java2s; import java.util.regex.Pattern; public class Main { public static boolean isLetterOrNum(String str) { String regex = "^[a-z0-9A-Z]+$"; Pattern pattern = Pattern.compile(regex); return pattern.matcher(str).matches(); }//from www . j av a 2 s . co m }