IS_EMAIL_ADDRESS

Description

Returns TRUE if the string is formatted as a valid email address; otherwise, returns FALSE.

Syntax

IS_EMAIL_ADDRESS(string) -> Boolean

Parameters

ParameterData TypeRequiredDescription
stringStringYesThe string to evaluate.

Examples

IS_EMAIL_ADDRESS("user@example.com")
-- Returns TRUE.
IS_EMAIL_ADDRESS("user.example.com")
-- Returns FALSE, as it lacks the '@' symbol.
IS_EMAIL_ADDRESS("user@")
-- Returns FALSE, as it lacks a domain.

Tips

  • Returns FALSE if the string is empty.
  • The following regular expression is used to check whether the provided string is a valid email address:

    ^(?=.{1,64}@)[A-Za-z0-9\\+*-]+(\\.[A-Za-z0-9\\+*-]+)*@[^-][A-Za-z0-9\\+-]+(\\.[A-Za-z0-9\\+-]+)*(\\.[A-Za-z]{2,})$