Hi I am new to Mysql and Regexp and wanted help in running the below regexp to clear whitespaces from a column called description in my table.
string = string.replace(/\s{2,}/g, ' ');
Can someone please help? I can do basic query's.
Hi I am new to Mysql and Regexp and wanted help in running the below regexp to clear whitespaces from a column called description in my table.
string = string.replace(/\s{2,}/g, ' ');
Can someone please help? I can do basic query's.
 
    
    No need for RegEx in that case. 
You can simply use the Trim() function from mySQL. 
It will simply remove all the white spaces :
SELECT TRIM('      removeSpaces      ');
--------
OUTPUT : [removeSpaces]   
