Android examples for java.util.regex:Blank Remove
remove Space from String using Regex
//package com.java2s; import android.text.TextUtils; public class Main { private static String removeSpaceString(final String inputString) { if (inputString == null) { return null; }/* ww w . jav a 2 s. com*/ String outputString = inputString.replaceAll("\\s", ""); if (TextUtils.isEmpty(outputString)) { return null; } return outputString; } }