aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-01-01 16:29:18 +0000
committerterminaldweller <devi@terminaldweller.com>2024-01-01 16:29:18 +0000
commit140c2704b2b1d420cb8a1287d41becf2212318dc (patch)
tree20300fb75fde3630ed0504cfcd6989f9a2bab024
parent455 (diff)
downloadleetcode-140c2704b2b1d420cb8a1287d41becf2212318dc.tar.gz
leetcode-140c2704b2b1d420cb8a1287d41becf2212318dc.zip
193
-rwxr-xr-x193/test.sh7
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