This is the full RFC 2822 regular expression for matching email addresses, with comments already stripped. It weighs in at a tiny 3768 bytes. (((((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d \x0a)[\x20\x09]+)*))*?(([\x41-\x5a\x61-\x7a]|[\x30-\x39]|[\x 21\x23-\x27\x2a\x2b\x2d\x2e\x3d\x3f\x5e\x5f\x60\x7b-\x7e])+( \x2e([\x41-\x5a\x61-\x7a]|[\x30-\x39]|[\x21\x23-\x27\x2a\x2b \x2d\x2e\x3d\x3f\x5e\x5f\x60\x7b-\x7e])+)*)((([\x20\x09]*(\x 0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*)) *?)|(((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x 0d\x0a)[\x20\x09]+)*))*?\x22(((([\x20\x09]*(\x0d\x0a))?[\x20 \x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))?(([\x01-\x08\ x0b\x0c\x0e-\x1f\x7f]|[\x21\x23-\x5b\x5d-\x7e])|(\x5c([\x01- \x09\x0b\x0c\x0e-\x7f]|(\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x 7f]\x0a*\x0d*)*))|(\x5c[\x00-\x7f]))))*((([\x20\x09]*(\x0d\x 0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))?\x2 2((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x 0a)[\x20\x09]+)*))*?)|(((((([\x20\x09]*(\x0d\x0a))?[\x20\x09 ]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))*?([\x41-\x5a\x61- \x7a]|[\x30-\x39]|[\x21\x23-\x27\x2a\x2b\x2d\x2e\x3d\x3f\x5e \x5f\x60\x7b-\x7e])+((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|( [\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))*?)|(((([\x20\x09]*(\x0 d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))* ?\x22(((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\ x0d\x0a)[\x20\x09]+)*))?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|[ \x21\x23-\x5b\x5d-\x7e])|(\x5c([\x01-\x09\x0b\x0c\x0e-\x7f]| (\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|(\x5c [\x00-\x7f]))))*((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x2 0\x09]+((\x0d\x0a)[\x20\x09]+)*))?\x22((([\x20\x09]*(\x0d\x0 a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))*?))( \x2e((((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\ x0d\x0a)[\x20\x09]+)*))*?([\x41-\x5a\x61-\x7a]|[\x30-\x39]|[ \x21\x23-\x27\x2a\x2b\x2d\x2e\x3d\x3f\x5e\x5f\x60\x7b-\x7e]) +((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x 0a)[\x20\x09]+)*))*?)|(((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+ )|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))*?\x22(((([\x20\x09] *(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+ )*))?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|[\x21\x23-\x5b\x5d-\ x7e])|(\x5c([\x01-\x09\x0b\x0c\x0e-\x7f]|(\x0a*\x0d*([\x00-\ x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|(\x5c[\x00-\x7f]))))*((( [\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x0a)[ \x20\x09]+)*))?\x22((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([ \x20\x09]+((\x0d\x0a)[\x20\x09]+)*))*?)))*))\x40((((([\x20\x 09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x0 9]+)*))*?(([\x41-\x5a\x61-\x7a]|[\x30-\x39]|[\x21\x23-\x27\x 2a\x2b\x2d\x2e\x3d\x3f\x5e\x5f\x60\x7b-\x7e])+(\x2e([\x41-\x 5a\x61-\x7a]|[\x30-\x39]|[\x21\x23-\x27\x2a\x2b\x2d\x2e\x3d\ x3f\x5e\x5f\x60\x7b-\x7e])+)*)((([\x20\x09]*(\x0d\x0a))?[\x2 0\x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))*?)|(((([\x20 \x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\ x09]+)*))*?\x5b(((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x2 0\x09]+((\x0d\x0a)[\x20\x09]+)*))?(([\x01-\x08\x0b\x0c\x0e-\ x1f\x7f]|[\x21-\x5a\x5e-\x7e])|(\x5c([\x01-\x09\x0b\x0c\x0e- \x7f]|(\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*)) |(\x5c[\x00-\x7f]))))*((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+) |([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))?\x5d((([\x20\x09]*(\ x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*) )*?)|((((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+(( \x0d\x0a)[\x20\x09]+)*))*?([\x41-\x5a\x61-\x7a]|[\x30-\x39]| [\x21\x23-\x27\x2a\x2b\x2d\x2e\x3d\x3f\x5e\x5f\x60\x7b-\x7e] )+((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\x0d\ x0a)[\x20\x09]+)*))*?)(\x2e(((([\x20\x09]*(\x0d\x0a))?[\x20\ x09]+)|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))*?([\x41-\x5a\x 61-\x7a]|[\x30-\x39]|[\x21\x23-\x27\x2a\x2b\x2d\x2e\x3d\x3f\ x5e\x5f\x60\x7b-\x7e])+((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+ )|([\x20\x09]+((\x0d\x0a)[\x20\x09]+)*))*?))*))) If you want to strip comments too, you'll need to run this recursivley until it fails to match: (\x28(((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x20\x09]+((\ x0d\x0a)[\x20\x09]+)*))?(|(\x5c([\x01-\x09\x0b\x0c\x0e-\x7f] |(\x0a*\x0d*([\x00-\x09\x0b\x0c\x0e-\x7f]\x0a*\x0d*)*))|(\x5 c[\x00-\x7f]))))*((([\x20\x09]*(\x0d\x0a))?[\x20\x09]+)|([\x 20\x09]+((\x0d\x0a)[\x20\x09]+)*))?\x29)