validation - Split and validate text that contains brackets, commas and integers -
how can split text contains brackets, commas , 3 integers. example:
{5,40,30} i want validate looks above.
try using regex.
var teststring = "12,23,{23,23},23,{51,22,345}{{]}1123,{12,12,232,123}{{33,33,33}}"; var regex = new regex(@"{\d+,\d+,\d+}"); var matches = regex.matches(teststring); the output of above test string after match
{51,22,345} , {33,33,33}

Comments
Post a Comment