function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jyosi jyosiJyosi jyosi 

Regex Expression in salesforce.com

Hello Every one
I am integarting with the other product,The phone number in salesforce.com is using (614)-903-5444
But i need to parse has 614-903-5444

How to remove the values.

Thanks a lot

Regards
Jyo


 
Best Answer chosen by Jyosi jyosi
Chidambar ReddyChidambar Reddy
If it is incase of Apex
 
string modifiedPhone = Phone.replaceAll('(', '').replaceAll(')','');

Incase of Formula fields, you can use 
SUBSTITUTE

 

All Answers

Chidambar ReddyChidambar Reddy
Hi Jyosi,

Where do you want this? in Formula fields or in Apex?
Chidambar ReddyChidambar Reddy
If it is incase of Apex
 
string modifiedPhone = Phone.replaceAll('(', '').replaceAll(')','');

Incase of Formula fields, you can use 
SUBSTITUTE

 
This was selected as the best answer
Jyosi jyosiJyosi jyosi
Thanks a lot

used this expression

replaceAll('\\(', '').replaceAll('\\)','');