© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
3 replies
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
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Find all instances of a substring in a string
C#CC# / help
10mo ago
❔ JObject find value
C#CC# / help
3y ago