There are some UK phone number regular expressions here.
The most highly rated one from that page is:
^(((+44s?d{4}|(?0d{4})?)s?d{3}s?d{3})|((+44s?d{3}|(?0d{3})?)s?d{3}s?d{4})|((+44s?d{2}|(?0d{2})?)s?d{4}s?d{4}))(s?#(d{4}|d{3}))?$
It is described as:
Matches +447222555555 | +44 7222 555 555 | (0722) 5555555 #2222
Non-Matches (+447222)555555 | +44(7222)555555 | (0722) 5555555 #22
Personally I would not put a strict regex on a phone number unless it is absolutely required to have the users actual phone number for identity verification or something involving payments. There are lots of variations of phone numbers, some users could even use Skype as their primary phone, and by putting a validation on you're just going to block/frustrate users.
Also note you have got the UK format wrong, UK phone numbers should contain 11 digits and are normally in the format (01234) 123123 - we never use dashes and first number should always be a 0.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…