You need to sign in to do that
Don't have an account?
Mandadi
Creating REGEX for replacing all special characters With Space except those between quotes
Hi All,
I need to build a regular expression to replace all the special characters in the string with space except those between quotes.
Can any one help me what is the regular Expression for this....
Thanks,
I need to build a regular expression to replace all the special characters in the string with space except those between quotes.
Can any one help me what is the regular Expression for this....
Thanks,
Can u give an example for what exactly u want?
Use the following to replace all special characters with space:
StringVariable=StringVariable.replaceAll('[^a-zA-Z0-9]',' ');
Brief explanation with an example for this post.
For example,
I have String like- abc,"mnc!".'xyz.'
Now my requirement is replace all special characters with space except quotes and those between quotes ...
So i want to get result like- abc "mnc!" 'xyz.'
Can u help me how to write Regex for this....
thanks,