+ Start a Discussion
Dipti DDipti D 

Phone number Parenthesis issue

Hi Friends, NEED help ASAP. Please.
I am trying to make a code change. Just one line. 
While passing a phone number, earlier we were passing all dashes as blanks. Now we need to exclude paranthesis as well.
i.e. (904) 111-2244 should be passed as 9041112244
How can i acieve this?
My old code is this. 
If i give double quotes as per some developer form suggestions, I get "No viable characterr "" error"

You can use Regex like this:
?CaseRecord.Phone__c.replaceAll('[^0-9.]','' );

This will remove all characters except numeric.