Hi. I am working with a long string and extracting certain pieces of information from it, where it is in a static place within the string. I now have an issue where I have some text that can change length.
I need to extract just numbers and the decimal place which I am doing by retrieving the first 25 characters of this section of the string by using the Regex statement of System.Text.RegularExpressions.Regex.Replace(strVolume,"[^/./0-9]","")
My issue is, there can be an additional number within the substring, which gets added to end of the number and makes it incorrect. For example:
464.27856000000000Class 4 gives me 464.278560000000004
431.42171877975682, Row 1 gives me 431.421718779756821
Is there anyway I can alter my regex to ignore “Class” or “, Row” and everything after them?