By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| regexp_replace('(914) 591-8563', '((\d{3}))\s*(\d{3})-(\d{4})', '\1\2\3') |
|---|
| (914) 591-8563 |
| regexp_replace('(914) 591-8563', '((\d{3}))\s*(\d{3})-(\d{4})', '\1\2\3') |
|---|
| (914) 591-8563 |