Sender blacklist with regular expression RSS Back to forum
2
@Quilliby:
In that case, the regex would be
.*\d{2}@domain\.com$
This means "any characters, any number of repetitions; followed by 2 digits; followed by @domain.com, end of string". Note that "any characters, any number of repetitions" includes digits as well, so this will also match "". If the username part preceding the 2 digits should allow only letters (no numbers, dots, dashes, underscores, etc.), try
[a-z]*\d{2}@domain\.com$
If letters, dashes, dots, underscores are allowed in the username part, preceding the 2 digits, try:
[a-z_\.-]*\d{2}@domain\.com$
Need some guidance with regex. We have two email address formats; and . The numbers on the second example range from 00-99. I would like to blacklist all senders that have any number between 00-99 at the end of their username before the @domain.com. Many thanks.