Android examples for java.util.regex:IP Address Pattern
replace Multiple Whitespace in a string
import java.util.Arrays; public class Main{ public static String replaceMultipleWhitespace(String original) { return original.replaceAll("(\\s)+", " "); }/* w w w.ja v a 2s . co m*/ }