Question : REGEXP Search

Can i use REGEXP to search this way:

table
ID || NAME
========
1  ||   'TEMP A123'
2  ||   'TEMPA123'
3  ||   'TEMP-A123'
4  ||   ' T$E%M@P#A%1@23   '

I want to get all above rows returned when searching for 'TEMPA123'.

I know replace but i might have a performance problem when the table becomes to big if use it.

Answer : REGEXP Search

You can use regular expressions (http://dev.mysql.com/doc/refman/5.1/en/regexp.html), but obviously searches will not benefit from an index. If performance is an issue, and the ignored characters are all outside of A-Z, a-z, and 0-9, you might want to consider adding an additional indexed column that contains the filtered value (like TEMPA123), and searching on that column. The column could be populated when a record is added to the table.
Random Solutions  
 
programming4us programming4us