Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { public static String filterCharacter(String text) { if (TextUtils.isEmpty(text)) return ""; return text.replaceAll("[^0-9a-zA-Z\u4e00-\u9fa5]", ""); } }