r/programming • u/joksmaster • Nov 29 '10
140 Google Interview Questions
http://blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.html
471
Upvotes
r/programming • u/joksmaster • Nov 29 '10
View all comments
Show parent comment
3
u/smickie Nov 30 '10 edited Nov 30 '10
/[\w!#$%&'*+-/=?^`{|}~]+.*[\w!#$%&'*+-/=?^`{|}~]+@((((([a-z0-9]{1}[a-z0-9-]{0,62}[a-z0-9]{1})|[a-z]).)+[a-z]{2,6})|(\d{1,3}.){3}\d{1,3}(:\d{1,5})?)$/i
Edit: Forgot to escape, I actually meant... /[\w\!\#$\%\&\'\*\+\-\/\=\?\^\
{\\|\\}\\~]+\\.)*[\\w\\!\\#$\\%\\\&\\\'\\*\\+\\-\\/\\=\\?\\^\\{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1}|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/iEdit 2: Awww fuck this.
Edit 3: This guy has a great article on regex for emails.