Page 2 of 2

Re: Valid email address

PostPosted: Sun Apr 12, 2009 6:11 pm
by ukoenig
Otto,

some more useful informations You can find here :
( a very good description about the Email-structure )

( A German Website )
http://aktuell.de.selfhtml.org/artikel/ ... /index.htm

Regards
Uwe :lol:

Re: Valid email address

PostPosted: Mon Apr 20, 2009 5:34 am
by hua
Possible useful resource for those who wish to do validation using regular expression - http://www.regular-expressions.info/email.html

Re: Valid email address

PostPosted: Mon Apr 20, 2009 10:55 am
by frose
Hi to all,

I'm using regular expressions!

Here is the sample code from the xharbour.com help file:
Code: Select all  Expand view
// The example extracts an eMail address from a text string.
// The search is case insensitive although the RegEx defines
// character classes only with upper case letters.

   PROCEDURE Main
      LOCAL cRegEx := "[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}"
      LOCAL cText  := "Send your request to info@xharbour.com " + ;
                      "for more information"
      LOCAL cEmail, nStart, nLen

      cEmail := HB_AtX( cRegEx, cText, .F., @nStart, @nLen )

      ? cEmail        // result: info@xharbour.com
      ? nStart        // result: 22
      ? nLen          // result: 17
   RETURN