I'm using the following Regex (which I found online) to obtain the urls within a HTML page;
Regex regex = new Regex(@"url\((?<char>['""])?(?<url>.*?)\k<char>?\)");
Works fine for the HTML below;
<div style="background:url(images/logo.png) no-repeat;">UK</div>
However returns more than I need when the HTML page contained the following Javascript, returning 'destpage'
function buildurl(destpage)
I tried the following regex to include a colon, but it appears to be invalid
:url\((?<char>['""])?(?<:url>.*?)\k<char>?\)
Any help would be much appreciated.