I am trying to find all email addresses in a column that contain characters that shouldn't be in an email address (e.g. ,
). The below script is working, however the '
character should also be filtered out, but I can't seem to get it into the script and have the rest of it work.
SELECT top 20 Email FROM users WHERE email LIKE '%[^-0-9a-zA-Z@.!#$%&*+-/=?^_`}{|~]%'
I tried adding it in via ''
and \''
but when I do, I start getting results that contain characters that I had previously filtered out (e.g. emails with a +
or .
in, but no undesired character).
Any advice would be greatly appreciated, thank you.