PerBonomi
5 years agoBoss
RegEx to block an email and its variations
Hi folks, figure this might be a good place to ask.
Now, realizing nothing is 100% fool- or troll proof, I was wondering if anyone here ever experimented with regex to try and block as many variations of a certain email address as possible.
Thanks.
We block pretty much any email address then allow some through with negative lookahead.
r:\b[\w.%+\-](?!buse)(?!iewerr)(?!kyboxofficesupport)(?!sername)(?!ccessories)(?!kysupport)(?!pps)(?!tvboxofficesupport)[\w.%+\-]+@[\w.\-](?!ky.uk)[\w.\-]+\.[A-Za-z]{2,6}(?!")(?!”)(?!.uk")(?!.uk”)\b