Skip to content

Commit 5888590

Browse files
Update 193. Valid Phone Numbers.sh
1 parent 5888627 commit 5888590

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

shell/193. Valid Phone Numbers.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
grep -E '^[0-9]{3}-[0-9]{3}-[0-9]{4}$|^\([0-9]{3}\) [0-9]{3}-[0-9]{4}$' file.txt
55

6-
:'
7-
^ start line
8-
$ end line
9-
\ escape trailing character
10-
() grouping
11-
[0-9]{3}-[0-9]{3}-[0-9]{4}$
12-
XXX-XXX-XXXX
13-
([0-9]{3}\) [0-9]{3}-[0-9]{4}
14-
(XXX) XXX-XXXX
15-
'
6+
<<COMMENTS
7+
^ start line
8+
$ end line
9+
\ escape trailing character
10+
() grouping
11+
[0-9]{3}-[0-9]{3}-[0-9]{4}$
12+
XXX-XXX-XXXX
13+
([0-9]{3}\) [0-9]{3}-[0-9]{4}
14+
(XXX) XXX-XXXX
15+
COMMENTS

0 commit comments

Comments
 (0)