To support simplicity, possibility and cost effective of PHP

Posts Tagged ‘ regex ’

A C# class to validate email and url

Jan 17th, 2008 | By admin | Category: Latest articles

Regular expression is not only difficult to write it correctly but also because we don’t have time to study details of a specification of the expression we want to validate. So I try to collect as much as I can common used regex for reference.

using System;
using System.Text.RegularExpressions;

public class GeneralValidation
{

public static bool IsEmail(string Email)
{
string strRegex = [...]