match Letter lower case - Android java.lang

Android examples for java.lang:String Case

Description

match Letter lower case

Demo Code


//package com.java2s;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

    private static final String V_LETTER_I = "^[a-z]+$";

    public static boolean Letter_i(String value) {
        return match(V_LETTER_I, value);
    }/*www .  j  ava  2  s .co  m*/

    private static boolean match(String regex, String str) {
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(str);
        return matcher.matches();
    }
}

Related Tutorials