public static GetAttributeValues ( string content, string tag, string attribute ) : string[] | ||
content | string | |
tag | string | |
attribute | string | |
Результат | string[] |
public static string[] GetAttributeValues(string content, string tag, string attribute)
{
Regex srcrx = CreateAttributeRegex(attribute);
MatchCollection matches = CreateTagRegex(tag).Matches(content);
var sources = new string[matches.Count];
for (int i = 0; i < sources.Length; ++i)
{
Match m = srcrx.Match(matches[i].Value);
sources[i] = m.Groups["Value"].Value;
}
return sources;
}