I need to get href argument value, but only for those <link> tags which has type='image/x-icon' attribute (by other words, favicon tags):
// Below ones must be parsed
<link rel="icon" type="image/x-icon" href="#" />
<link rel="shortcut icon" type="image/x-icon" href="#" />
// Below ones must be ignored
<link rel="stylesheet" href="styles.html">
<link rel="search" href="search.html">
<link rel="help" href="help.html">
The problem is type="image/x-icon" could be before href="#" or after it, but exactly one of these cases. How I can express it in regular expression from JavaScript?