htmanning has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to stop bogus Russian hackers who use bogus email addresses. I'm trying to detect more than 2 dots in an email string. For example, test.test@gmail.com is fine, but test.test.test.test@gmail.com is not. The following seems to work, but I wonder if someone can validate what I have. I first detect if there are two at signs that signal they are trying to bcc others, and then I look for a comma, and then the periods. Is this right?
Thanks.if ($sender =~ /\@.*\@|,|\..*\..*\.|\n/i) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Stopping excessive periods in email
by pryrt (Abbot) on Jul 16, 2021 at 19:09 UTC | |
|
Re: Stopping excessive periods in email
by haukex (Archbishop) on Jul 16, 2021 at 20:42 UTC | |
|
Re: Stopping excessive periods in email
by LanX (Saint) on Jul 16, 2021 at 19:45 UTC | |
|
Re: Stopping excessive periods in email
by marto (Cardinal) on Jul 16, 2021 at 19:05 UTC | |
|
Re: Stopping excessive periods in email
by Marshall (Canon) on Jul 16, 2021 at 18:57 UTC | |
|
Re: Stopping excessive periods in email
by Anonymous Monk on Jul 17, 2021 at 13:01 UTC | |
|
Re: Stopping excessive periods in email
by Anonymous Monk on Jul 17, 2021 at 13:56 UTC | |
by htmanning (Friar) on Jul 20, 2021 at 19:19 UTC |