Displaying page
of
pages;
Items to
Title |
Test
Details
UK Phone # with International option
|
Expression |
^\s*\(?((\+0?44)?\)?[ \-]?(\(0\))|0)((20[7,8]{1}\)?[ \-]?[1-9]{1}[0-9]{2}[ \-]?[0-9]{4})|([1-8]{1}[0-9]{3}\)?[ \-]?[1-9]{1}[0-9]{2}[ \-]?[0-9]{3}))\s*$
|
Description |
UK phone number formats with optional international prefix, optional spaces, dashes and brackets. Brackets mandatory for regional/capital leading zero if included in international form. Based on "Mh" UK London & Regional. (Thanks Mh for the groundwork). New to Regex so I'm sure it can be done more elegantly... but it works.
|
Matches |
0208-123-4567 | 01234-567890 | (01234) 567890 | +44 (0)1234 567890 | +044(0)1234567890
|
Non-Matches |
208-123-4567 | 012345-67890 | (1234) 567890 | 44 (0)1234 567890 | +034(0)1234567890
|
Author |
Rating:
Andrew McCormick
|
Displaying page
of
pages;
Items to