From: Thomas Adam Date: 2008-01-14T09:09:11+09:00 Subject: Re: regular expression Hi -- On 13/01/2008, Johnathan Smith wrote: > hey > > im looking to write a regular expression for an email address > however, i want the first part of the name to be initials (first initial > and optional middle initial) and a surname > > such as > > j.m.smith@domain.com > > any help would be greatly appreciated What is it you want to do with this? a="j.m.smith@domain.com" p "yes" if a.scan(/\w+\.(\w+\.)??(\w+)??\@(\w+)(.*)/).size > 0 And several other variations thereof. -- Thomas Adam