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}

enter image description here


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -