Android Utililty Methods Regex Match

List of utility methods to do Regex Match

Description

The list of methods to do Regex Match are organized into topic(s).

Method

booleancheckPattern(String pattern, String value)
Check a String with a pattern
Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(value);
return m.matches() ? true : false;
intgetNumber(String string)
get Number
int result = 0;
Matcher m;
String regEx = "[^0-9]";
Pattern p = Pattern.compile(regEx);
if (string != null) {
    m = p.matcher(string);
    result = Integer.valueOf(m.replaceAll("").trim());
return result;