Sender blacklist with regular expression - ORF Forums

Sender blacklist with regular expression RSS Back to forum


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 Many thanks.

by Quilliby 6 years ago

@Quilliby: In that case, the regex would be


This means "any characters, any number of repetitions; followed by 2 digits; followed by, 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


If letters, dashes, dots, underscores are allowed in the username part, preceding the 2 digits, try:


by Krisztián Fekete (Vamsoft) 6 years ago
(in reply to this post)

New comment

Fill in the form below to add a new comment. All fields are required. If you are a registered user on our site, please sign in first.

It will not be published.
hnp1 | hnp2