I need to extract a link from a string using regular expression in C#. I cannot use a substring method since both the letters in the string and the link may vary. This is the link with surrounding letters:
-sv"><a href="http://sv.wikipedia.org/wiki/%C3%84pple" title="
The -sv"><a href="
part must be included in the regex or it won't be specific enough.
The end of the regex may be at the quotation markat the end of the link or whichever is the easiest way.
I've had another suggestion aswell, however, this does not include the sv-part in the beginning and the submitter couldnt make it compile:
@"]*?HREF\s*=\s*[""']?([^'"" >]+?)[ '""]?[^>]*?>";
Now I'm turning to you guys on stackoverflow. Thanks in advance! Max