I want to run a mysql query where I get all data from rows where one of the characters is not one of the following: a-z, 0-9, #, [space]. I have no clue where to start.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using Mysql, You should find the answer here : http://dev.mysql.com/doc/refman/5.1/en/regexp.html
try something like :
select * from tablewhere field_name NOT REGEXP '[a-z]|[0-9]|[:space:]';
Should work, good luck !