This is my string (for example):
-sv"><a href="http://sv.wikipedia.org/wiki/%C3%84pple" title="
now the length of this part of the string and also the rest of the string may vary.
What I want to extract is the link between the quotation marks. I've tried to make a regex but I couldn't make the quotation marks work within the quote, this is what it looks like (I have no idea of what I did there...):
Regex linkRegex = new Regex(@"sv""><a href=""\s*(?sv""><a href=""[^<]+)\s*"" title""", System.Text.RegularExpressions.RegexOptions.Compiled);
if ( linkRegex.IsMatch(k) )
{
Match match = linkRegex.Match(k);
string theLink = match.Groups["link"].Value;
x = theLink;
}
Point is: it doesn't work, and I don't see it work anytime soon without anyone who knows this black magic helping me.
Thanks in advance :)


Sign In
Create Account

Back to top









