Hello! I have a string with a lot of information that i need to extract a value from.
The string contains alot of information from a website and the value in it is:
“Number 1. Amount: 43 dollars”
“Number 2. Amount: 22 dollars”
“Number 3. Amount: 23 dollars”
I only want to get the value 3. What i want to extract is only (in this example) 23 dollars, and the amount can vary and so can the order of the list (Number 1, 2, 3, etc.). So what i want to do is use a reg ex that starts with "Number 3. Amount: ", and trim the rest.
My current code takes all the values from the rest of the page starting from Number 3. and ending with the last time “dollars” occurs. Can someone please help me alter it so that it trims the rest instead?
System.Text.RegularExpressions.Regex.Match(EntirePage,"((?<=Number 3. Amount:).*(?= dollars))").Value