le regular expression le puoi formare come vuoi, anche dinamicamente, sono semplici stringhe quindi puoi crearle dinamicamente, e fare qualcosa tipo:
var source = "il tuo documento / riga da parsare";
var dim1 = 122;
var dim2 = 43;
var regex = @"\d{5}" + dim1 + @"\d{5}" + dim2; // ecc....
var match = Regex.Match(source, regex);
if (match.Success)
{
// match.Value
}
Michael Denny | Microsoft Visual C# MVP
http://blogs.dotnethell.it/Regulator/
http://dennymichael.net
http://mvp.microsoft.com/mvp/Michael%20Denny-5000735
Twitter: @dennymic