I'm new in regex and i'm trying to parse the CSS file, to get the:
- @imports "file.css"
- url (pathtoFile)
But it fails.
Regex cssUrls = new Regex(@"(url|@import)\((?<char>['""])?(?<url>.*?)\k<char>?\)", RegexOptions.IgnoreCase);
foreach (Match item in cssUrls.Matches(sData))
{
MessageBox.Show(item.Groups[2].Value);
}
Anyone can help me please ? Thanks in advance!