I'm trying to code a scraper in C#, the thing is I have already made one in PHP but I'm trying to migrate on C#.
Can this possibly be converted on C# as I'm not yet good in coding with this language.
PHP Function:
function fetchValue($string,$start,$end){
$str = explode($start,$string);
$str = explode($end,$str[1]);
return $str[0];
}
What it exactly does is it extracts the first occurence string between the START and the END.
How is it used:
$exampleString = "long live stackoverflow";
$fetchString = fetchValue($exampleString,"long "," stackoverflow";
echo $fetchString;
This will then output the word "live" as the START was "long" and the END was "stackoverflow"
Every answers will much be appreciated! Thanks in advance!