Function overview
Prototype
_ExtractEmailDomain (
emailAddress )
Parameters
emailAddress
Description
Tags:
Text Parsing Email
Extracts the domain name (without the extension) from an email address
Examples
Sample input
marcelo@wingraconsulting.com
Sample output
wingraconsulting
Function code
/*
Name:
_ExtractEmailDomain
History:
Created by Marcelo Piñeyro, Wingra Consulting LLC, marcelo@wingraconsulting.com
Date created: December 19, 2011
Date modified: ---
Purpose: To extract the domain name (without the extension) from an email address
Parameters: an email address
Dependencies: none
Example: _ExtractEmailDomain ( "marcelo@wingraconsulting.com" ) returns wingraconsulting
*/
Let([
email = emailAddress ;
p1 = Position( email ; "@" ; 1 ; 1 ) ;
p2 = Position( email ; "." ; p1 ; 1 )
] ;
Middle( email ; p1 + 1 ; p2 - p1 - 1 )
)
// ===================================
/*
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/318
Prototype: _ExtractEmailDomain( emailAddress )
Function Author: Marcelo Piñeyro (http://www.fmfunctions.com/mid/281)
Last updated: 20 December 2011
Version: 1
*/
// ===================================
/*__LITBR__Name:__LITBR___ExtractEmailDomain__LITBR____LITBR__History:__LITBR__Created by Marcelo Piñeyro, Wingra Consulting LLC, marcelo@wingraconsulting.com__LITBR__Date created: December 19, 2011__LITBR__Date modified: ---__LITBR____LITBR__Purpose: To extract the domain name (without the extension) from an email address__LITBR____LITBR____LITBR__Parameters: an email address__LITBR____LITBR____LITBR__Dependencies: none__LITBR____LITBR____LITBR__Example: _ExtractEmailDomain ( "marcelo@wingraconsulting.com" ) returns wingraconsulting__LITBR____LITBR__*/__LITBR____LITBR__Let([__LITBR__ email = emailAddress ;__LITBR__ p1 = Position( email ; "@" ; 1 ; 1 ) ;__LITBR__ p2 = Position( email ; "." ; p1 ; 1 ) __LITBR__] ;__LITBR__ Middle( email ; p1 + 1 ; p2 - p1 - 1 )__LITBR__)__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/318__LITBR____LITBR__ Prototype: _ExtractEmailDomain( emailAddress )__LITBR__ Function Author: Marcelo Piñeyro (http://www.fmfunctions.com/mid/281)__LITBR__ Last updated: 20 December 2011__LITBR__ Version: 1__LITBR____LITBR__*/__LITBR__// ===================================
Login or register to comment
Create a new account with fmcustomfunctions.com or login to post a comment.