Updated timestamp tool to replace all occurences

This commit is contained in:
Kenneth Skovhede
2014-04-05 16:03:10 +02:00
parent 178a166f1b
commit b2f35cb18d
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -92,8 +92,11 @@ namespace UpdateVersionStamp
{
var re = FILEMAP[Path.GetFileName(p.File)];
var txt = File.ReadAllText(p.File);
var m = re.Match(txt).Groups["version"];
txt = txt.Substring(0, m.Index) + nv + txt.Substring(m.Index + m.Length);
//var m = re.Match(txt).Groups["version"];
txt = re.Replace(txt, (m) => {
var t = m.Groups["version"];
return m.Value.Replace(t.Value, nv);
});
File.WriteAllText(p.File, txt);
}