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

2 lines
100 B
Bash
Executable file

#!/bin/bash
grep -E "^([[:digit:]]{3}-|\([[:digit:]]{3}\) )[[:digit:]]{3}-[[:digit:]]{4}$" file.txt