UK phone numbers should contain 11 digits
UK phone numbers usually have 9 or 10 digits not including the 0 trunk code or +44 country code. A few have only 7 digits.
and are normally in the format (01234) 123123
The example shows a UK 4+6 format number. The UK uses a variety of formats including 2+8, 3+7, 4+6, 4+5, 5+5 and 5+4 for geographic numbers and 0+10, 0+9 and 0+7 for non-geographic numbers.
There's a handy list at:
http://www.aa-asterisk.org.uk/index.php/Number_format
Match UK telephone number in any format
^(?:(?:\(?(?:0(?:0|11)\)?[\s-]?\(?|\+)44\)?[\s-]?(?:\(?0\)?[\s-]?)?)|(?:\(?0))(?:(?:\d{5}\)?[\s-]?\d{4,5})|(?:\d{4}\)?[\s-]?(?:\d{5}|\d{3}[\s-]?\d{3}))|(?:\d{3}\)?[\s-]?\d{3}[\s-]?\d{3,4})|(?:\d{2}\)?[\s-]?\d{4}[\s-]?\d{4}))(?:[\s-]?(?:x|ext\.?|\#)\d{3,4})?$
The above pattern allows the user to enter the number in any format they are comfortable with. Don't constrain the user into entering specific formats.
Extract NSN, prefix and extension
^(\(?(?:0(?:0|11)\)?[\s-]?\(?|\+)(44)\)?[\s-]?)?\(?0?(?:\)[\s-]?)?([1-9]\d{1,4}\)?[\d[\s-]]+)((?:x|ext\.?|\#)\d{3,4})?$
$2 will be '44' if international format was used, otherwise assume national format.
$4 contains the extension number if present.
$3 contains the NSN part.
Validation and formatting
Use further RegEx patterns to check the NSN has the right number of digits for this number range. Finally, store the number in E.164 format or display it in E.123 format.
There's a very detailed list of validation and display formatting RegEx patterns for UK numbers at:
Regular Expressions for Validating and Formatting GB Telephone Numbers
It's too long to reproduce here and it would be difficult to maintain multiple copies of this document.