3 Answers
3

this is regular expression . String regex = "[1-3]{3}(-)[1-3]{3}(-)[1-3]{3}(-)" ;
this regex is [1-3] = between 1 and 3 any charachter and then {3} three character.
(-) must be a '-' char. because example regex is "123-212-222"