my-solutions/leetcode/0193-valid-phone-numbers/main.sh

3 lines
100 B
Bash
Raw Normal View History

2022-12-18 11:29:45 +05:00
#!/bin/bash
grep -E "^([[:digit:]]{3}-|\([[:digit:]]{3}\) )[[:digit:]]{3}-[[:digit:]]{4}$" file.txt