Hi I need to remove some unwanted characters from a string, I'm trying to make a regex to match the required characters but I feel like I'm miles off and don't want to create false positives. Some help would be very much appreciated.
The starting string looks like:
'SELECT \t* \nFROM \tAudit_Log a WHERE changedate > \'2016-07-21T18:51:41.900Z\''
however this doesn't get parsed correctly by MYSQL, so it needs to look like:
'SELECT * FROM \tAudit_Log a WHERE changedate > '2016-07-21T18:51:41.900Z''
I've tried this but not having much luck:
str = str.replace('\t', '');
str = str.replace('\n', '');
str = str.replace('\\', '');
\tdoing in a sql statement? And, what if it's some other letter?