Brian Dunning's FileMaker Custom Functions

ExtractEmailAddresses ( text ; placeholder )

Extract Email Addresses

  Average rating: 4.4 (40 votes) Log in to vote

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

Share on Facebook Share on Twitter

  Sample input:
ExtractEmailAddresses ( "Here are some email addresses

john@doe.com but you could also use bill.dokes@gmail.com or Alice " ; "" )
  Sample output:
john@doe.com
bill.dokes@gmail.com
alice@yahoo.com

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

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

The result displays a list of email addresses.

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

 

Comments

Adam Aronson   Adam Aronson, Paramus, NJ
Mar 14, 2011
Hi Bart,

In order to account for the "<" and ">" email delimiters appearing in a source we were filtering I changed your "stext =" line to:

stext = Substitute ( text ; [ " " ; "¶" ] ; [ "<" ; "¶" ] ; [ ">" ; "¶" ] )

...and it works like a charm!

Thanks for this.

Best,
Adam Aronson
FullCity Consulting Inc.
adam@fullcityconsulting.com
http://fullcityconsulting.com
 
Bart Bartholomay   Bart Bartholomay, Vero Beach
Mar 14, 2011
Thanks. That's why I put this up in it's infancy. I'd like to get the same type of comments from the ExtractPhoneNumbers CF, too.
 
Bart Bartholomay   Bart Bartholomay, Vero Beach
Mar 14, 2011
i have since changed the CF to comply with Aron's suggestion.
 

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: