Hi im trying to write a validation class using : regexp-me lib because of the answer of this post.
What did i do
String id = "123456789";
String pattern = "\\d{7,8}";
public boolean validate(String id,String pattern){
RE regular_expresion = new RE("\\d{7,8}");
return regular_expresion.match(id);
}
This code should have returned false with that "id" since the pattern just should accept 7 to 8 digits. However if i use id = "1234567" it return true , the code is accepting 7 or more digits.
The {m,n} is working as a {n,}.
Has someone had this problem before?