public static void Main()
var validation ="required|sffdfdsfsdf|custom_validation[^\\d{5}[10]or[100](-\\d{4})?$###Invalid zipCode format. US format zip code formats (e.g., '94105-0011' or '94105')]";
var afterTheSplit = validation.Split('|');
foreach(var field in afterTheSplit){
if(field.StartsWith("custom_validation")){
string regx = field.Substring(0,field.IndexOf("###")).Replace("custom_validation[","");
regx =regx.Replace("or","|").Replace("\\",@"\");