is it possible to do a pattern replace in mysql ?
say if i have a text like "Mozilla /4.0 (compatible others" , I would need to take off the "(compatible" part from that string and have the result displayed as "Mozilla /4.0 others" .
I know that the pattern to search for is a text starting with "(" and ending with a space character but am not sure of how to do it.Can anyone help?
Sorry .. I think that I should have explained more ..
The project that am involved with has got two tools .. one is a c++ file that does all the inserts and updates and the other one is a php that does only selects ..
and am handling only the selects.. If I were able to do the updates, then i would have validated the field even before inserting the data.So am left with no choice than to filter the data before displaying.
The data that is stored into the table has two information . One is the browser information and the other one is Operating System information..and because of this am getting all weird kind of data like
These are just sample ones ... So I thought that the best way to get these two data displayed is to do a pattern replace like /\((.*?) /is ... .I can do this using php's preg_replace also but since am doing summary reports and I need to count the 3rd and 5th data as the same , it wud be better if i can do it in mysql. i heard that one can do rlike or regexp ... is it possible to combine this and replace() to accomplish the task?