I have a String variable that contains \'*\' in it. But Before using it I have to replace all this character.
I\'ve tried replaceAll function but without success:
Try this.
You need to escape the * for the regular expression, using .
*
text = text.replaceAll("\\*","");