International Phone Number Rules

You are here:

International Phone Number Expressions

Rock allows you to create rules for formatting international phone numbers. Below is a list of patterns for specific countries that those in the community have submitted for sharing. If you have patterns to share for your country please email them to us.

These rules should be added to the 'Phone Country Code' Defined Type found under 'Admin Tools > General Settings > Defined Types > Phone Country Code'.

United Kingdom

Value Description Match Expression Format Expression
44 UK Landline Number in 2+8 Format ^(44)?(0)?(2[0-9]{1})(\d{4})(\d{4})$ $3 $4 $5
44 UK Landline Number in 3+7 Format ^(44)?(0)?(11[0-9]{1}|1[0-9]{1}1)(\d{3})(\d{4})$ $3 $4 $5
44 UK Landline Number in 5+5 or 5+4 Format ^(44)?(0)?(13873|15242|15394|15395|15396|16973|16974|16977|17683|17684|17687|19467)(\d{4,5})$ $3 $4
44 UK Landline Number in 4+6 or 4+5 Format, or Mobile Number ^(44)?(0)?(\d{4})(\d{5,6})$ $3 $4
Note when using these rules the leading 0 will not be stored in the database. This may cause issues when people enter the leading 0 during check-in. There is a block setting on the check-in 'Search' block that allows you to add a regex to run the person's inputed search string through. Entering '[0](\d*)' would remove the first 0 in their input.