I've tried testing my code with the examples provided in the conditions and it doesn't work. I'm not sure that I've used the escape characters properly. Also, line 16
if (temp.length() != 10) return false;
has a warning "Condition is always true", and I'm not sure why