Brian Dunning's FileMaker Custom Functions

ExtractPhoneNumbers ( text ; placeholder )

Extract Phone numbers

  Average rating: 4.5 (28 votes) Log in to vote

Bart Bartholomay   Bart Bartholomay
HAB Marketing
http://habmarketing.com

Share on Facebook Share on Twitter

  Sample input:
ExtractPhoneNumbers ( "Here are some phone numbers

(555) 222 - 1212. 555-9876
777555-2222. 44 444 555-6666" ; "" )
  Sample output:
555 222 1212
555 9876
777 555 2222
44 444 555 6666

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Input any type of text that includes phone numbers making sure that they don't run together and are separated by at least a "." or carriage return. Enter a "" null value for the placeholder.

The result displays a list of phone numbers.

Note: This is version 2.0 and has NOT been checked against all conceivable types of phone numbers. Please email the author if you have suggestions.

 

Comments

Rakesh   Rakesh, Netherlands
Aug 15, 2012
Accepting telephonenumbers starting with 00 44... etc would be great.
 
Bart Bartholomay   Bart Bartholomay, Vero Beach, FL
Aug 15, 2012
Had a request to amend this Custom Function to account for European codes, and while not all formats have been tested a country code of "XX" will work.

The Custom Function can be changed fairly easily to accommodate others.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: