Brian Dunning's FileMaker Custom Functions

GetEmailAddr ( Text )

Extracts email addresses from text

  Average rating: 4.7 (22 votes) Log in to vote

Denham Morgan   Denham Morgan
NeuroScience Associates
http://http://www.neuroscienceassociates.com/

Share on Facebook Share on Twitter

  Sample input:
Blah, Blah: at [me@mail.co], other text.
  Sample output:
me@mail.co

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

Adapted from Daniele Raybaudi's GetEmail function.
It extracts all email addresses from text.
Added a substitution filter for common characters found surrounding email addresses. Recursive function.

Thanks, Daniele Raybaudi for GetEmail!

12/17/2013 Added some more characters to filter out and fixed GetEmailAddr ( nextText )

10/22/2014 Corrected for blank line if no email addresses.

 

Comments

Bruce Robertson   Bruce Robertson
Dec 17, 2013
Small correction, toward the end GetEmail ( nextText ) should be GetEmailAddr ( nextText )
 
Till Seelemann   Till Seelemann, Leipzig, Germany
Oct 16, 2014
If you have only one address in the text, a blank line appears at the end of the result. Solution:

Case (
  count > 1; word & "¶" & GetEmailAddr (next text);
  count = 1; word;
  ""
)
 

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 15 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:

Under construction. Email me your wish list for improvements.