Skip to content

Instantly share code, notes, and snippets.

@shiumachi
Created January 12, 2011 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiumachi/776249 to your computer and use it in GitHub Desktop.
Save shiumachi/776249 to your computer and use it in GitHub Desktop.
detect us phone number using regexp
#!/bin/sh
grep -H -e "^\(([0-9]\{3\})\|[0-9]\{3\}-\)[0-9]\{3\}-[0-9]\{4\}$" test.in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment