phone number replace

Youngsoo Lee 2016-09-11 20:09:11
Testing simple regex.
Replace phone number like '010-1234-5678' to '01012345678'

properties

* regex (0[0-9]{2})-([0-9]{3,4})-([0-9]{3,4})
replace \1\2\3
IGNORECASE
LOCALE
MULTILINE
DOTALL
ASCII
VERBOSE

input

1
2
3
4
5
6
7
8
9
10
010-1234-4566
011-123-445
010-1234-4566
011-323-4457
010-1234-4566
019-1423-4457
010-1234-4566
011-1213-4457
010-1234-4566
017-1243-4457

output

1
2
3
4
5
6
7
8
9
10
01012344566
011123445
01012344566
0113234457
01012344566
01914234457
01012344566
01112134457
01012344566
01712434457

comments