ExtractingEmails ( )

Function stats

Average user rating
46
372
9999
Support
FileMaker 7.0 +
Date posted
25 November 2014
Last updated
25 November 2014
Version
Recursive function
No

Author Info
 Agnès

17 functions

Average Rating 4.6

author_avatar



 

Function overview

Prototype

ExtractingEmails  ( TheText;   Separator )


Parameters

TheText  Texte or List we contains eMail


Separator  dd your separator words, always separator followed by a space [sep][space][sep][space] etc - by défault : # & ^ < \ > ¶ ( ! ) ; , :


Description

Tags:  parsing   mail   list   extract   email   address  

ExtractingEmails ( TheText ; Separator ) v1.1
//----------------------------------------------
to extract eM@ils
ExtractingEmails it is not a recursive function

-> No to verify address eMail, just extract what there is before and after the @ with the predefined separators.

Examples

Sample input

ExtractingEmails ( "3 @ddress to extract <j.og@domain.com and [address@mail.com; fr@com.net, and @other" ; "" )

-------------

ExtractingEmails ( "*j.og@domain.com+address@mail.com*fr@com.net+@other*" ; "* + " )


Sample output

j.og@domain.com
address@mail.com
fr@com.net

-------------

j.og@domain.com
address@mail.com
fr@com.net

 

Function code

// ExtractingEmails ( TheText ; Separator ) v1.1
//
// to extract eM@ils
// ExtractingEmails is not recursive function
//
// -> No to verify address eMail, just extract what there is before and after the @ with the predefined separators.
/*
//---------------------------------- Parameter

• TheText : Texte or List we contains eMail
• Separator : add your separator words, always separator followed by a space [sep][space][sep][space] etc
- by défault : # &      ^ < \ > ¶ ( ! ) ; , : " " ”" “" ' ‘ ’ « » ? / ! [ ]
^
l_ "tab"

//---------------------------------- Example

ExtractingEmails ( "3 @ddress to extract <j.og@domain.com and [address@mail.com; fr@com.net, and @other" ; "" )
> Result : j.og@domain.com¶address@mail.com¶fr@com.net
ExtractingEmails ( "*j.og@domain.com+address@mail.com*fr@com.net+@other*" ; "* + " )
> Result : j.og@domain.com¶address@mail.com¶fr@com.net
*/
//————————--—---------------------——————-————
// @ Agnès - November 2014- BugReport
// Substitute ( filemaker§tictac.fr ; § ; @ )
//—————---------------------———————-———-————-

Let ([

$Txt = TheText ;
S = "# &      ^ < \\\ > \¶ ( ! ) ; , : \"\" \”\" \“\" \' \‘ \’ « » ? / ! [ ] " & Separator ;
Cean = "#" & Evaluate ( "Substitute ( $Txt ; [\"" & Substitute ( S ; [ "@" & " " ; "" ] ; [ " " ; "\" ; \" \"] ; [\"" ]) & " \" ; \"\¶#\"])" ) ;
//----------------------------------------------------- End Clean

R = Substitute ( Cean ; [ "@¶#" ; "#" ] ; ["#@"; "#" ] ; [ "@" ; "@¶@" ] ) ;
Fb = Substitute ( R ; ["¶" ; "#¶"] ; [ "@#" ; "@" ] ) & "#" ;
D = FilterValues ( R ; Substitute ( R ; "#" ; "" ) )
];
Substitute ( FilterValues ( R ; Fb & ¶ & D ) & "[end]" ; [ "#¶" ; "" ] ; [ "¶[end]" ; "" ] ; [ "#" ; "" ] ; [ "@¶@" ; "@" ] ; [ ".¶" ; ¶ ] )
)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/372

    Prototype: ExtractingEmails( TheText; Separator )
    Function Author: Agnès (http://www.fmfunctions.com/mid/46)
    Last updated: 25 November 2014
    Version: 1.1

*/
// ===================================

 

 

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (31)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Interface  (15)
Layout  (15)
Text  (14)
Variables  (12)
Layout Objects  (11)
Filter  (11)
Design  (10)
Array  (7)