How to regex extract uk postcodes and phone numbers from excel text cells
- Step 1Upload the Excel file with address or contact text — Drop the .xlsx or .csv with the column containing embedded postcodes or phone numbers.
- Step 2Enter the extraction regex — For UK postcodes use: ([A-Z]{1,2}[0-9][0-9A-Z]?\s?[0-9][A-Z]{2}). For UK phone: (\+44[\s\d-]{9,12}|0[\d\s-]{10,12}).
- Step 3Download the extracted column file — The new postcode or phone column is clean and ready for geocoding or CRM import.
Frequently asked questions
Does the UK postcode regex handle all valid formats?+
The pattern handles most residential and commercial UK postcode formats. Obscure Crown dependencies (GIR 0AA, BFPO postcodes) may require a more specialised pattern.
Can I extract both postcode and phone number in one run?+
One regex per run in the current version. Run twice — once for postcode, once for phone — to add both columns.
How do I handle addresses where the postcode is not present?+
Cells without a matching postcode will have an empty output cell. The match rate report shows how many cells were successfully extracted.
Privacy first
Every JAD Excel tool runs entirely in your browser using SheetJS and ExcelJS. Your spreadsheets, formulas, and data never leave your device — verified by zero outbound network requests during processing.