I am trying to write a regex to match a pattern like
7777-555-999
The pattern is valid only if all four digits are same as first digit like 7777.If first digit is 6 then first four digits should be 6666 . similarly for next 3 and the last 3. How to match exact digit as first.kindly update