using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Swift.web.Library { public class UtilityRegExp { /// /// A Regular Expression to Match any null Json object in a string /// like "Samaj_Shekhar":null, /// Useful in removing nulls from serialized Json string /// public static string JsonNullRegEx = "[\"][a-zA-Z0-9_]*[\"]:null[ ]*[,]?"; /// /// A Regular Expression to Match an array of null Json object in a string /// like [null, null] /// Useful in removing null array from serialized Json string /// public static string JsonNullArrayRegEx = "\\[( *null *,? *)*]"; /// /// A Regular Expression to Match an Email Address /// Useful in validating email addresses /// public static string ValidEmailRegEx = @"^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$"; } }