String strText = 'Welcome - to! % $sale&sforce \\ /code # crack %'; strText = strText.replaceAll('[^a-zA-Z0-9\\s+]', ''); System.debug('strText ======> '+strText);