StringCollection resultList = new StringCollection();
try {
Regex regexObj = new Regex(@"\s*?");
Match matchResult = regexObj.Match(subjectString);
while (matchResult.Success) {
resultList.Add(matchResult.Groups[1].Value);
matchResult = matchResult.NextMatch();
}
} catch (ArgumentException ex) {
// Syntax error in the regular expression
}
是否一定要用正则?
用js或者jquery获取a标记或者img的属性也可以的