C#C
C#4y ago
Jona4Play

Find all HREFs out of string and extract value

Hey, I am currently developing a web scraper and therefore want to extract all available information. Because of that I want to get the links to the JavaScripts and CSS Files. As far as I know this isn't supposed to be done with HTML Agility Pack and so I looked into Regex. Sadly, I didn't find a working example of Regex for that purpose. I tried myself but as I am unfamiliar with Regex syntax I haven't made much progress. I already have a method to construct the full URL from the relative one.
Does anyone of you have a working approach to extract just JS and CSS file links?
TYIA
Was this page helpful?