From: Sam Roberts Date: 2003-01-27T05:41:17+09:00 Subject: Re: common regular expressions Quoteing dcarrera@math.umd.edu, on Mon, Jan 27, 2003 at 05:17:02AM +0900: > Hi Michael, > > > Has anyone compiled a collection of 'common' regular expression > > patterns. > > Never heard of such a list. The O'Reilly book "Mastering Regular > Expressions" probably contains a whole lot. Including one for a valid rfc822 email address list, which takes about a page, no spaces. > > - valid email addresses > > Short answer: /^\w+\@[\w\.]+\w+$/ > > Take an email address: "joe97_smith@some.domain.org" How about we take: "hi y@"."ruby \",master!" ( ... a comment!!) @ u%me . u+me . u-me its syntactically valid, too! Though admittedly unusual... Cheers, Sam