C# Examples

Best site for developers

  • Home
  • About C#
    • C# Interview Questions and Answers
    • Learn C#
  • ALL POSTS
  • Bootstrap Examples
  • PHP Examples
  • CONTACT

Tag Archives: email validation

23 Jun

C# Email Validation With Regular Expression

This example shows how to validate an email address using regular expression.

Sample Usage:

        
            Regex regEx = new Regex("^([0-9a-zA-Z]([-\\.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$");
            bool result = regEx.IsMatch("admin@csharexamples.com");
            //result = true
turgay Posted in C# .NET C#, email validation, regular expression Leave a comment

Post navigation

Categories

Recent Posts

  • C# Binary Search Tree Implementation
  • Select,Insert,Update,Delete Data in Access File using C#
  • C# Collections Tutorial
  • C# ArrayList Example
  • C# Stack Example
Fruitful theme by fruitfulcode Powered by: WordPress
↑