我正在使用C#和ASP.Net创建一个应用程序,它将从特定URL获取所有电子邮件地址,为此,我使用
来加入innerHTML WebClient client = new WebClient();
string downloadString = client.DownloadString("abc");
return downloadString;
问题是在innerHTML中,电子邮件地址部分是由document.write呈现的Javascript编码数组,因此我无法获取电子邮件地址,我有一个很好的正则表达式来识别电子邮件地址,因为它是识别除了我要求的所有其他电子邮件地址
JavaScript,我在InnerHTML中得到的就像那样
var l = new Array();
l[0] = '>';
l[1] = 'a';
l[2] = '/';
l[3] = '<';
l[4] = '|109';
l[5] = '|111';
l[6]
l[52] = '|101';
l[53] = '|100';
l[54] = ':';
l[55] = 'o';
l[56] = 't';
l[57] = 'l';
l[58] = 'i';
l[59] = 'a';
l[60] = 'm';
l[61] = '"';
l[62] = '=';
l[63] = 'f';
l[64] = 'e';
l[65] = 'r';
l[66] = 'h';
l[67] = ' ';
l[68] = 'a';
l[69] = '<';
for (var i = l.length - 1; i >= 0; i = i - 1) {
if (l[i].substring(0, 1) == '|') document.write("&#" + unescape(l[i].substring(1)) + ";");
else document.write(unescape(l[i]));
}