Formatting Phone Fields upon creation of contacts via Leads app.

Formatting Phone Fields upon creation of contacts via Leads app.

Hi people,

I was just wondering what would be the best way to format a phone field. Currently we can end up with all different types of separators when scanning business cards, some examples being:

Landline:
61 - 7 - 43211234
617.4321.1234

Mobile:
(041) 234-1234

The goal being to remove all of these erroneous characters. Ideal formats would be:
617 4321 1234
0412 341 123

but space placement is secondary. 


I'm fresh into using Zoho custom functions and unfortunately there's no test environment so there's not much room for trial and error. If someone could help walk me through the core steps to writing up and implementing this custom function I'd appreciate it greatly.