a ‘+’ symbol is a valid part of an email username, and can be used in debugging and SPAM control. I use username+websitepostedon@server.com (the real address being username@server.com) when I post my email on a site where it could get displayed for spam harvesters.
However, most CMSs use this regular expression in their email address checking algorithms.
"/^([a-z0-9_]|\-|\.)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,4}\$/i"
Please replace that line with this so the plus sign gets recognized. That is a much better practice. Thank you!
"/^([a-z0-9_+]|\-|\.)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,4}\$/i"
Another option from Phil :
I’ve always used these two in conjunction. The first one we don’t want, and the second one we do want.
(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)
^.+\@(\[?)[-a-zA-Z0-9\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$
rtr
I’ve always used these two in conjunction. The first one we don’t want, and the second one we do want.
(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)
^.+\@(\[?)[-a-zA-Z0-9\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$
Picked this up somewhere, and it seems to accept the + sign.
used it and it wouldnt accept any emails even valid ones.
which expression are you talking about?