Yazan: dp | 02 June 2009 | Comments
Categories: Uncategorized
Recently, I needed to find all of the data in a table that was being used for HTML output, that had non-printable characters. The following SQL statement should do that for you:
select id, name
from table_name
where name not regexp ‘^[a-zA-Z0-9_ ,&;\/<>(²):%*#?$|!+.\"\'-]+$;
This code is MySQL specific, but should be applicable anywhere, really.