On Thu, Mar 15, 2001 at 02:20:14AM +0900, David Fung wrote:
> i would like to locate probable email addresses in a bunch of text files,
> but don't know how to build a regexp for the search.  glad if somebody can
> help.

/\w+@\w+(\.\w+)+/

should probably work.  That is

stuff.grep(/\w+@\w+(\.\w+)+/)

Now, this is assuming an email address can only be made up of
chracters from a-zA-Z0-9_.  I don't know if that's a real
limitation.  I think it is a limitation on the domain name, so
the following might work:

/.+@\w+(\.\w+)+/

Have fun,

Jimmy

-- 
jjthrash SPAM pobox SPAM com