@vc table(vc varchar(50))
@vc
'dhskjdhfkss' union all
'dhsk@fkss' union all
select ';dhsk@fkss.ooo' union all
'dh-sk@fk-ss.ooo' union all
'dh\sk@fk-ss.ooo' union all
'@fkss.das' union all
'dhsk@fkss.a.asd.asd.aaaaaa' union all
'dhsk@fkss.ddd..dddd' union all
'dh+k@fkss.ddd.d' union all
'dhsk@fkss.ddd.kk.dd' union all
'dhsk@f#ss.ddd' union all
'd--k@f_ss.ddd' union all
'------@__-ss.___._._._' union all
'dhsk@f#ss.ddd' union all
'dh_k@fkss.ddd' union all
'dhsk@fkss.' union all
'.dhsk@fkss.nnn' union all
'sgsgaha.sksjkajd.d.d.dhsk@fkss.nnn.dsdsd.as' union all
'd.h.s.k@f.k.s.s.f' union all
'd@f.s' union all
'd.hs@fkss.d' union all
vc.vc VALID____________________________
@vc vc
not vc.vc like '%[^a-Z0-9.@!_-]%' escape '!' --contains only alphanumeric, '-', '.' and '@'
not vc.vc like '%@%@%' --has no more than one '@' sign
not vc.vc like '%..%' --no adjacent dots
not vc.vc like '.%' --no leading dot
and vc.vc like '%[^.]@[^.]%._%' --has an '@' without dots next to it, and to its right a dot followed by another char.
vc.vc INVALID__________________________
@vc vc
vc.vc like '%[^a-Z0-9.@!_-]%' escape '!' --contains only alphanumeric, '-', '.' and '@'
vc.vc like '%@%@%' --has no more than one '@' sign
vc.vc like '%..%' --no adjacent dots)
vc.vc like '.%' --no leading dot
not vc.vc like '%[^.]@[^.]%._%' --has an '@' without dots next to it, and a dot afterwards.
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant