Parsing a free-rorm field looking for an email address

Jeff Harrison jeffaharrison at yahoo.com
Thu Jan 26 15:44:53 PST 2006


--- "Mike Schwartz (PC Support & Services, Appleton,
WI)" <mschw at athenet.net> wrote:

>      Does anybody have a routine that parses a
> free-form line looking for
> an email address in it?  I thought somebody posted a
> routine that did
> this a while ago.
> 
> Thanks!
> 
> -- 

First - to answer your question - I am not aware of
one.  ISTR that someone posted an edit that does some
validation on an email address though.  Perhaps you
could write an extract routine that uses that edit if
you can find it.

Second, this is a great example of where a user
defined function would be handy IMO.  I've talked
about this before, and I even sent a request to the
wishlist on it.  If the feature were available you
could write code to implement it that would be very
easy on the eyes.  For example:

email = extractemail(textfield)

As it is right now you could do this with call tables,
but you would need to return the values with variables
or dummy fields, and this could get unwieldy pretty
quickly if you have hundreds of library routines that
may each use several variables each.  In this case for
example:

LIBtextfield = textfield
call "lib/extractemail"
email = LIBemail

Good Luck.

Jeff Harrison
jeffaharrison at yahoo.com

Author of JHExport and JHImport.  The easiest and
fastest ways to generate code for filePro exports and
imports.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Filepro-list mailing list