• Matches an RFC 5322 compliant email address

    Parameters

    • global: boolean = true

      Whether to match globally.

    Returns RegExp

    A RegExp matching an email address.

    Example

    Construct an Email Placeholder Regex

    const emailPlaceholderRegex = Matches.Container("email", [], Matches.EmailAddress());
    console.log(emailPlaceholderRegex.test("{{email:johnny.appleseed@apple.com}}")); // true
    console.log(emailPlaceholderRegex.test("{{email:http://www.google.com}}")); // false

    See

    https://www.regular-expressions.info/email.html

Generated using TypeDoc