Quantcast
Channel: regex c# extracting url from tag - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Maciej Kozieja for regex c# extracting url from tag

Try this:var input = "<a style=\"font - weight: bold; \" href=\"https://website.com/-id1\">MyLink</a><a style=\"font - weight: bold; \"...

View Article



Answer by Panagiotis Kanavos for regex c# extracting url from tag

Regular expressions can be used in very specific, simple cases with HTML. For example, if the text contains only a single tag, you can use "href\\s*=\\s*\"(?<url>.*?)\"" to extract the URL,...

View Article

regex c# extracting url from tag

I am trying to extract URL from an tag, however, instead of getting https://website.com/-id1, I am getting tag link text. Here is my code:string text="<a style=\"font - weight: bold; \"...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images