More readable and maintainable code
Instead of regex:
Pattern.compile("\\b\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\b");
Use:
"\\b\\p{Digit}{10}\\b"
or
"\\b\\d{10}\\b"
or
"\\b[0-9]{10}\\b"
Comments