Here is my regular expression : I want to replace string with empty value so that only unwanted characters left. Somehow it is returning the same string, not replacing any character defined in regular expression:
var regExpress = /^([a-zA-Z0-9!#%^*()\-\_+=|}{'";:\/.,\s]*)$/gi;
strMessage = strMessage.replace(regExpress, '');
what am I doing wrong ? I know it should be simple but unable to figure it out .