This is probably something really simple, but I haven't
found an answer
just by browsing so I figured I'd just ask....
First the code:
string s = Regex.Match(val,
"[0-9].[0-9]+" x
[0-9]").Value;
string num1 = s.Substring(0, ???);
string num2 = s.Substring(s.IndexOf('x') +
2, 1);
double num01 = Double.Parse(num1);
double num02 = Double.Parse(num2);
double dec = (num01 * num02) / 70;
return dec;
What i'm trying to do is tell num1 that its length is the
distance
between the start of the match, and the first " .
|