Skip to content

Instantly share code, notes, and snippets.

@Breefield
Created November 14, 2013 01:45
Show Gist options
  • Save Breefield/7459896 to your computer and use it in GitHub Desktop.
Save Breefield/7459896 to your computer and use it in GitHub Desktop.
twitter_regex = /(@[A-Za-z0-9_]{1,15})/i
formatted_phone_regex = /((?:\+?(\d{1,3}))?[- (]*(\d{3})[- )]*(\d{3})[- ]*(\d{4})(?: *x(\d+))?\b)/i
email_regex = /(\b[^\s]+?\s*(@|at)\s*[^\s]+?\.[^\s]+?\b)/i # Very general so as to catch BS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment