Could someone please help meto improve this part of code?
The string is something like this: Current Hourly Price (HOEP): $20.09/MWh (2.01¢/kWh). this is one line on website where data of 20.09 and 2. 01 changes within time
static void get_HOEP(string web)
{
int x = web.IndexOf("Current Hourly Price");
...
}
I want just to display something like: Current Hourly Price: 2.01 ¢/kWh
Thanks for help
Use a regex, result will be in the variable result.
–EDIT– Full Class Version
PriceParser.get_HEOP1(web)simply replaces the match in the search stringPriceParser.get_HEOP2(web)replaces the entirity of web with the replacement string