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
Jack OliverJack Oliver 

automatically remove all characters like paranthesis from phone numbe. using Trigger

Arun ParmarArun Parmar
Hi Jack,

You can do like this,
for(Contact con : Trigger.New){
    con.Phone = (con.Phone).replaceAll('[^0-9]', '');
}

OR
for(Contact con : Trigger.New){
   String phoneNumber = con.Phone;
    phoneNumber = phoneNumber.replaceAll('[^0-9]', '');
   con.Phone = phoneNumber ;
}

It will work.

Thanks
Jack OliverJack Oliver
hiii Arun 

phoneNumber.replaceAll('[^0-9]', '') this method remove All charechter like  [ $,  a ,- ,{,(, / ,+ ]. 
but i want a solution that only remove parentheses symbol like {[()] .
hope you will understand.

thanks 
Jack