aboutsummaryrefslogtreecommitdiffstats
path: root/193/test.sh
blob: b02f5ff7c5cddb66c85747c0e1845b853b70e081 (plain) (blame)
1
2
3
4
5
6
7
#!/usr/bin/bash

# while IFS= read -r line; do
#   echo "$line" | grep -Eo "^(\([0-9]{3}\)\s|[0-9]{3}-)[0-9]{3}-[0-9]{4}$"
# done < ./file.txt

grep -e "^[0-9]\{3\}\-[0-9]\{3\}\-[0-9]\{4\}$" -e "^([0-9]\{3\}) [0-9]\{3\}\-[0-9]\{4\}$" file.txt