GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 05-Jun-2008, 11:27
khushal_kkk's Avatar
khushal_kkk khushal_kkk is offline
Awaiting Email Confirmation
 
Join Date: Mar 2008
Posts: 50
khushal_kkk is an unknown quantity at this point

email validation in C++


i need to knoe how to make a program for email validation..i mean to say that in email there will be only 1 @ and only one " . " and all other letters will be either alphabatec or numeric.if any of them is not present or mre than one time repeated the compiler tell us that the email is not valid how to code it..?
  #2  
Old 06-Jun-2008, 02:03
mamntc02 mamntc02 is offline
Junior Member
 
Join Date: Mar 2008
Location: Barcelona - Catalonia
Posts: 57
mamntc02 has a spectacular aura about

Re: email validation in C++


Hi,

Your specifications are not completely true. For example this is a valid address:
Quote:
name-surname@computer_name.net_name.com
And it has more than one '.', and also has not alphabetic or numeric characters.

An easy google search "mail validations", will give results like this:
http://www.dreamincode.net/forums/showtopic39880.htm
http://www.secureprogramming.com/?ac...pes&recipeid=3
Easy, isn't it?

As an advice which you can follow or not, if you really want to learn, first try it by yourself, look for help (in a book, internet, ....), and if you find problems then ask.

Regards.
__________________
Please, correct me if I'm wrong, and sorry for my english ;)
  #3  
Old 06-Jun-2008, 02:14
ocicat ocicat is offline
Regular Member
 
Join Date: May 2008
Posts: 580
ocicat is a jewel in the roughocicat is a jewel in the rough

Re: email validation in C++


In addition to mamntc02's comments, this type of problem is typically solved through regular expressions. Unfortunately, regular expressions are not part of C++ proper, however a number of vendors release (non-standardized) libraries with their products. Although regular expressions are very powerful & solve this problem easily, code using them is frequently non-portable.

If you want to find out more about regular expressions, look up the subject at [url=http://wikipedia.org]Wikipedia[/ur].
 
 

Recent GIDBlogOnce again, no time for hobbies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Daily Opt-In Email Leads - "Download 2,000 Email List Every Hour" geza1969 Member Announcements, Advertisements & Offers 1 10-Dec-2007 22:40
Bulk Email hosting *** .com Bullet proof hosting additional2 Web Hosting Advertisements & Offers 1 20-May-2007 14:55
bulk Email Marketing Bullet proof hosting additional2 Web Hosting Advertisements & Offers 0 08-Jul-2006 13:57

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:10.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.