Thursday, July 17, 2014

Find strings with starting and ending pattern in asp.net

search for text within Formula braces "Formula()"
Regex r = new Regex(@"Formula((.+?)\))");

search for text within curly braces "{{}}"
Regex r = new Regex(@"{{(.+?)}}");

MatchCollection mc = r.Matches(s, 0);



No comments:

Post a Comment