check Blank Space by Regex - Java java.util.regex

Java examples for java.util.regex:Match Word

Description

check Blank Space by Regex

Demo Code


//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*/
}

Related Tutorials