Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Convert to standard mobile format (AirTable formulas)

Topic Labels: Formulas
109 0
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi,

So I’m using PHP which has this functionality built in (basically I give it a number and it converts it to how I would like it…) specifically I’m in Australia but the format I’ve chosen to go with is like this:

+61415932797

so let’s break this down

+61 = country code

415932797 < number obviuosly

In Australia though when you call someone on mobile you dial 04… so it would be like

0415932797

if that makes sense (since you don’t use country codes when dialling within the country)… so I’ve got a bunch of these mobiles like this in my AirTable:

0402 930 888 - like this which I want to convert to

+61402930888 - as you can see no spaces (random spacing in my original) - ideally also skip any fields that have text in them but that’s an easy thing… so…

yeh long story short how do I regex

04 01 933 833 to

+61401933833

also keep in mind a number could all ready be country code… but then again I could just filter those with + and fix manually or something but would be good if for example

+61415933933 is left untouched by the regex

Hope that makes sense.

Thanks!

0 Replies 0