oh, I see you wish to supply something like 5'6" (5 feet 6 inches).. well, in c# I'd start with something like
String feetinchRegexString = @"
(?<feet>[\d.]+) # Feet
(\') # ' Feet Marker
(?<inch>[\d.]+) # Inch
(\") # " Inch Marker
";
# NB Have to use RegexOption.IgnorePatternWhiteSpace
I doubt that regex is actually usable, Im just surmising some of the things you'd need to think about - it doesn't take into account things like
5' 3/16"
for example - NB in C# using 'named groups' you would extract 'feet' and 'inches' like this
Regex feetinchesRegex = new Regex(feetinchesRegexString, RegexOption.IgnorePatternWhiteSpace);
Match match = regex.Match(sample);
if (match.Success)
{
Console.WriteLine(match.Groups["Feet"].Value);
Console.WriteLine(match.Groups["Inches"].Value);
}
Im pretty sure you'd be able to do the same in VB.Net, and re-do my regex for all conditions - then you simply combine feet and inches into a 'double' perhaps and apply the correct multiplication factor