Valid email address

Re: Valid email address

Postby ukoenig » Sun Apr 12, 2009 6:11 pm

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Valid email address

Postby hua » Mon Apr 20, 2009 5:34 am

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.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Valid email address

Postby frose » Mon Apr 20, 2009 10:55 am

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
 
Windows 11 Pro 22H2 22621.1848
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Harbour 3.2.0dev (r2008190002)
FWH 23.10 x86
User avatar
frose
 
Posts: 392
Joined: Tue Mar 10, 2009 11:54 am
Location: Germany, Rietberg

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 96 guests