I want VB.NET regular expression for below format
7966-591739
I mean user must have to enter 4 numeric characters first then “-“ and then 6 numeric characters after that optional for numeric as well as for characters. In my case user can also enter
7966-591739 ext 562
7966-591739 x 434
Please suggest!
I belive that UK number often have 5 digits before your ‘-‘ character.
I’ve updated @NawaMan’s answer to make it run and to remove the capturing groups:
And here to capture the number groups:
And here is the expression cleaned up:
UPDATED – To as per OP’s request.