Java Regular Expression match lower case letters

Description

Java Regular Expression match lower case letters


//package com.demo2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        String string = "";
        System.out.println(allCharactersLowerCase(string));
    }/*  ww  w.j  a  v  a2s . c om*/

    public static boolean allCharactersLowerCase(String string) {
        return string.matches("^[a-z]*$");
    }
}



PreviousNext

Related