diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-01-01 16:29:18 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-01-01 16:29:18 +0000 |
commit | 140c2704b2b1d420cb8a1287d41becf2212318dc (patch) | |
tree | 20300fb75fde3630ed0504cfcd6989f9a2bab024 /193 | |
parent | 455 (diff) | |
download | leetcode-140c2704b2b1d420cb8a1287d41becf2212318dc.tar.gz leetcode-140c2704b2b1d420cb8a1287d41becf2212318dc.zip |
193
Diffstat (limited to '193')
-rwxr-xr-x | 193/test.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/193/test.sh b/193/test.sh new file mode 100755 index 0000000..b02f5ff --- /dev/null +++ b/193/test.sh @@ -0,0 +1,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 |