I am working on rest API services. I need to push phone number as a string in the body of the request.
I tried following way.
String Str1=ts.phone.replaceAll('(','');
String Str2=Str1.replaceAll(')','');
String Str3=Str2.replaceAll('-','');
But I'm getting the following error
System.StringException: Invalid regex: Unclosed group near index 1
Please let me know how to convert