add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE "EMPLOYEES"
( "PHONE_NUMBER" VARCHAR(20))



Insert into EMPLOYEES (PHONE_NUMBER) values ('515.123.4567');

1 rows affected
Insert into EMPLOYEES (PHONE_NUMBER) values ('011.44.1345.729268');

1 rows affected
select REGEXP_REPLACE(phone_number,'([[:digit:]]{3})\.([[:digit:]]{3})\.([[:digit:]]{4})$',
'\1-\2-\3') regex_output
from employees;
REGEX_OUTPUT
515-123-4567
011.44.1345.729268
select REGEXP_REPLACE(phone_number,'^/(?:011.44.)([[:digit:]]{3})\.([[:digit:]]{3})\.([[:digit:]]{4})$',
'\1-\2-\3') regex_output
from employees;
REGEX_OUTPUT
515.123.4567
011.44.1345.729268