First this is for Java usage.
I am trying to create a pattern to match any string to have the format ddd-dd-ddd first 10 characters and it can or cannot have any character or characters followed. In the pattern said above :
d = digit
- = hyphen (it is a fixed character)
Example strings this pattern should match: