Brian Dunning's FileMaker Custom Functions

CleanAddressList ( DirtyAddressList )

Filters only email addresses from a text.

  Be the first to rate this function Log in to vote

Federico Severin   Federico Severin - Show more from this author
Sevesoftware Engineering
http://www.sevesoftware.it

Share on Facebook Share on Twitter

  Sample input:
CleanAddressList ( "John Wick " )
  Sample output:
john.wick@gmail.com

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

Made to parse copied email addresses from email clients or other applications, that usually add unwanted text to the email address, and drop the useless text keeping only a clean email address list.

Input:
DirtyAddressList: text containing email addresses mixed to other text, like account names.

Output:
_AddressListClean: list of only words containing the '@' char.

Notes:
In case you need better parsing, you can add new separators to convert to ¶ in the _Chunks definition.

 

Comments

Markus   Markus, COBIX Consult
Oct 25, 2022
Hi Federico, cool CF! Slightly adjusted to ensure unique values in case of double entries like
"pilgram@immo-master.xx" :

// result = only unique email addresses, no trailing return
LeftWords (UniqueValues (_AddressListClean); 9999)
 
Federico Severin   Federico Severin, Sevesoftware Engineering
Oct 25, 2022
@Markus thanks for your suggestion.
I improved the function to get only once repeated email addresses... and more. I used a slightly different technique because LeftWords ( ... ; 9999 ) has a limit, though it's far.
 

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: