0

I want to input the mobile number in the Text field after saving the record the mobile number should display in (999) 999-9999 format.

I've tried creating a formula field of text and gave the below formula

SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE( Phone__c ,
 '.', NULL),
 ' ', NULL), 
'-', NULL), 
')', NULL),
 '(', NULL)

But it doesn't work for me. Can anyone help me doing this?

1

1 Answer 1

1

Try this regex ^[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s./0-9]*$

here regexr.com/3c53v

You must log in to answer this question.