Open Source Development Tutorials | Newsletter Signup | About Us
Search  

Go Back   Open Source Tutorials Forum > Programming Languages > Perl Programming
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-21-2005, 01:38 AM
freak_vss freak_vss is offline
Junior Member
 
Join Date: Oct 2005
Posts: 2 freak_vss is on a distinguished road
Default email validation using perl

Hi all,
Im new to perl programming. Im working on an email validation program in perl. In this program, the user enters an email address and the program outputs whether the entered email address is valid or not. Im trying to do this using the Regular expression in perl. It will be a great help if any of you guys can please help me as how to structure this regular expression. Thanks a lot.
Reply With Quote
  #2  
Old 03-28-2006, 05:14 AM
peoplejunction peoplejunction is offline
Junior Member
 
Join Date: Mar 2006
Posts: 1 peoplejunction is on a distinguished road
Default

Code:
if ($email !~ /[\w\-]+\@[\w\-]+\.[\w\-]+/) {
    # Not a valid e-mail address. Create error message.
}else{
    # Valid e-mail address. Continue...
}
Reply With Quote
  #3  
Old 02-09-2008, 05:08 PM
presentationmall presentationmall is offline
Junior Member
 
Join Date: Feb 2008
Posts: 2 presentationmall is on a distinguished road
Default

Quote:
Originally Posted by peoplejunction
Code:
if ($email !~ /[\w\-]+\@[\w\-]+\.[\w\-]+/) {
    # Not a valid e-mail address. Create error message.
}else{
    # Valid e-mail address. Continue...
}



Thanks for your information.
__________________
Valentines Day Gift Baskets
Valentines Day Gift Baskets
Skin Care
Skin Care
Anti Aging Skin Care
Anti Aging Skin Care
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



All times are GMT -5. The time now is 11:08 PM.


Powered by: vBulletin Version 3.0.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright 2004 - 2006 GrindingGears.com. All Rights Reserved.