Valid email address

User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Valid email address

Post 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:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Re: Valid email address

Post by hua »

Possible useful resource for those who wish to do validation using regular expression - http://www.regular-expressions.info/email.html
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
User avatar
frose
Posts: 327
Joined: Tue Mar 10, 2009 11:54 am
Location: Germany, Gütersloh
Contact:

Re: Valid email address

Post by frose »

Hi to all,

I'm using regular expressions!

Here is the sample code from the xharbour.com help file:

Code: Select all

// 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
 
Post Reply