$email (parse-spec) function


The email address portion of the word given by parse-spec is returned. The email address must be in the form x@y.z. If the parse-spec value does not return an email address, the match specification is not matched. This function is especially useful in a nested specification. For more information, see Nested-parse-expressions.

The following examples show target strings, parse expressions, and return values:

Target string

Parse expression

Return value

sendto: x@y.net

$email ($2)

x@y.net

test sendto: no-reply@AA.com

$email (sendto: *)

no-reply@AA.com

usr:=a@b.c

$email (usr:=*)

a@b.c

sendto: X@Z

$email (sendto: *)

No match

Explanation: The matched text is not an e-mail address. 

sendto: ABC

$email ($2)

No match

Explanation: The second word of the target string is not an e-mail address

email: X@y.com value

$email (xxx: *)

No match

Explanation: There is no match for xxx: * in the target string. 

Related topic


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*