int firstTag = source.IndexOf("data-token=");
int lastTag = source.IndexOf("\"href", firstTag);
int startIndex = firstTag + 12;
int endIndex = lastTag + 5;
string authenticityToken = source.Substring(startIndex, endIndex - startIndex);
The string I want to parse is from here:
<a class="bizLink" data-token="-iUzEhgdscgbpj5VMi5zoh54FTeFt8M4mj5nsiodxR5VzZOhniodpj6nFQg0nce3MhUxFSgdxjM4J
jUVzZuNu8o0sREnFSUzISUXzZWh4iodGQfdxR5VzZWh4iodGQfhli6fnce_="
href="
I want to get only the string between " and " only this:
-iUzEhgdscgbpj5VMi5zoh54FTeFt8M4mj5nsiodxR5VzZOhniodpj6nFQg0nce3MhUxFSgdxjM4J
jUVzZuNu8o0sREnFSUzISUXzZWh4iodGQfdxR5VzZWh4iodGQfhli6fnce_=
But what I get with my code is this long string I wanted, but also all the rest of the file text.