{
string test = "1a2bc23AB4C15";
//string regex = "(?
string regex = "[\\d]+";
Regex regNoCase = new Regex(regex, RegexOptions.IgnoreCase);
Regex regCase = new Regex(regex);
MatchCollection matchNoCase = regNoCase.Matches(test);
MatchCollection matchCase = regCase.Matches(test);
List
lstIndex.Sort(CompareLst);
}
public int CompareLst(Match x, Match y)
{
int iFirst =0;
int.TryParse(x.Value,out iFirst);
int iSecond;
int.TryParse(y.Value,out iSecond);
return iFirst.CompareTo(iSecond);
}
No comments:
Post a Comment