I want to match the following string pattern for my code. the string value is fixed as below:
630512-07-5847
Pattern p = Pattern.compile("(\\d{6,6})-(\\d{2,2})-(\\d{4,4})");
I've tried the code above, however, when it has more number such as "630512312-07-5847" , it still return true