function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
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
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