On Mon, Jan 31, 2000 at 03:13:29PM -0800, Derek J. Balling wrote: > For the record, I haven't been following this too closely, but referencing > the Owl Book, (Mastering Regular Expressions) pp. 313-316 might be > worthwhile. Jeff came up with a regex that matches the "spec" e-mail > address (and would match t@cx appropriately), that is 6598 bytes long. (or > spans several pages in a more "readable" format *G*) While that's useful to determine if a given string is an email address (and its encapsulated in the Email::Valid module), it doesn't help to scan plain text for possible email addresses. Again, the problem is that almost -anything- can be an RFC 822 address. For example: "So tell me when the text ends and the email address <foo@bar.com> begins." Problem is that 'foo@bar.com', 'address <foo@bar.com>', 'email address <foo@bar.com>' and 'So tell me when the text ends and the email address <foo@bar.com>' are all valid email addresses. Of course, the -important- part is found between the carets and you could possibly try to snip that out. Then there's the issue of message IDs. Most email and usenet message IDs also happen to be valid email addresses. WHAT FUN! -- Michael G Schwern schwern@pobox.com http://www.pobox.com/~schwern /(?:(?:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe