Email Address Abstractor

Version 3


    Mac OS X, Windows
    Alan Chen
    FMP 7, 8, 8.5, 9, 10, 11
    Web: Yes
    File Type: FP7
    Server: Yes
    FileSize: ~ .11 megabytes


    This set of script steps will be able to look at any body of text (think email body, or pasted PDF document) and abstract all email addresses from the body and create a record in a separate table. Calculations in the other table can be easily establish to weed out emails that are simply too long or do not fit your other criteria. This script can easily be adopted with a POP email plugin to download emails and abstract them on a periodic basis. Can be easily adapted to search for other things like web URL’s, etc.



    Script requires two local variables($fore and $aft) that start with the numeric value of 1. These variables serve as position counters. The script will loop through text before and after the asperand symbol.


    before the @ symbol, loop:

    Filter(Middle(Lower(Text::YourTextField);$position-$fore;1);"0123456789abcdefghijklmnopqrstuvwxyz.-_")="" or


    Middle(Lower(Text::YourTextField);$position-$fore;1)="@" or


    $position - $fore = 1


    after the @ symbol:






    $position+$aft = Length(Text::YourTextField)


    After a valid fore and aft section is established, put the email together using a set variable to $email variable:


    /*ASSUMPTION: valid emails should contain at least 2 characters before the @ and 3 after. Probably no more than 60 per side; fail safe enabled. */


    Case($fore < 2 or $aft < 4; "" ;

    $fore > 60 or $aft > 60; "" ;

    Middle ( POP3it_Messages::POP3it_Body_Text ; $position - $fore + 1; $fore + $aft-1 )



    set $email to new record in another table and you’ll be good to go.



    Sample Input
    Sample Output
    Any specified field with email addresses in it like will be examined and all emails abstracted as new records in another table

    Developer's Notes



    FileMaker Inc. provides this content on an “As Is” basis, without any warranty, and subject to the terms of the FileMaker Technical Network Agreement. FileMaker makes no representations and is not liable for any content or related information. You may use the content as part of your own solutions and for your customers, but you may not otherwise publicly distribute any content that you did not submit. ©2009-2011 FileMaker, Inc. All Rights Reserved. FileMaker is a trademark of FileMaker, Inc. registered in the U.S. and other countries.