Convert Sentence into formula VB.NET C#
Posted on 2012-04-10
Okay, this is not homework. But, I am looking for a method to input a string in and then calculate the resultant value.
I have a string such as "Eight Furlongs On The Dirt Track"
Now, I can pull out the "On The Dirt Track" part using a simple string.remove().
There are two formats to this string, and they are as follows:
1: [number] [distance] On The [surface] <-Surface is irrelevent but dynamic as well
example - "Eight Furlongs On The Dirt Track"
2: [number] And [number] [distance] On The [surface]
example - "One And One Sixteenth Miles On The Turf"
Any suggestions as to how to do this, VB.NET or C# will work.