Je vois pas l'interet d'utiliser le foreach:
Par contre j ai empty dans matchA.Groups["versionVi"].Value c'est normal car au debug il trouve que matchA.Groups["versionVe"].Value
Code:
1 2 3 4
|
string pattern = @"(?<=\\)(VE(?<versionVe>\d{2}))|(VI(?<versionVi>\d{2}))(?=\\)";
Match matchA = new Regex(pattern, RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase).Match(e.Node.Tag.ToString());
this.labelVersImgTxt.Text = "ve" + matchA.Groups["versionVe"].Value + "_vi" + matchA.Groups["versionVi"].Value; |