-
Henry Huang thinks this is interesting:
echo "(555) 123-4567" | grep -E '^\(?[0-9][0-9][0-9]\)? [0-9] [0-9][0-9]$' (555) 123-4567 [me@linuxbox ˜]$ echo "555 123-4567" | grep -E '^\(?[0-9][0-9][0-9]\)? [0-9] [0-9][0-9]-[0-9][0-9][0-9][0-9]$' 555 123-4567 [me@linuxbox ˜]$ echo "AAA 123-4567" | grep -E '^\(?[0-9][0-9][0-9]\)? [0-9] [0-9][0-9]-[0-9][0-9][0-9][0-9]$' [me@linuxbox ˜]$
Minimise