Java examples for java.util.regex:Match Word
check Blank Space by Regex
//package com.java2s; import java.util.regex.Pattern; public class Main { public static boolean checkBlankSpace(String blankSpace) { String regex = "\\s+"; return Pattern.matches(regex, blankSpace); }/*from ww w .j a v a 2 s . c om*/ }