Using the Asterisk Wildcard

You can use the asterisk (*) as a wildcard in email addresses when defining routes.

Wildcards can appear in the name or domain sections of an email address. The following are valid examples:

  • *@*: Valid representation of all email addresses.

  • *@domain.tld, name@*.tld: Valid representation of the whole name or the domain (not the top level domain (TLD)).

  • *@*.tld: Valid representation of both the name and the domain (not the TLD).

Wildcards cannot appear in a subdomain or the top-level domain. Wildcards also cannot appear with other letters; they must appear alone. The following are invalid examples:

  • name@domain.*.tld: Invalid representation of a subdomain.

  • name@domain.*: Invalid representation of a TLD.

  • *name@domain.tld: Invalid use in conjunction with a name.