Language:

IsEmailAdress()

Language: Deutsch
Programming Language: C#
Published by: Thomas
Last Update: 5/4/2006
Views: 892

Description

Funktion prüft auf gültige E-Mail-Adresse

Code

1 public static bool IsEmailAdress(string strEmail) { 2 try { 3 Regex objNotWholePattern=new Regex("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"); 4 return objNotWholePattern.IsMatch(strEmail); 5 } 6 catch { 7 return false; 8 } 9 } 10

No comments avaiable

Add a comment

Name *  

Email (won't be displayed) *    

Website  

Comment *  

Sicherheitscode Security Code *    

RSS