
長蜘蛛網了!
有時候人太忙~~卡瑪值就默默地一直降一直降一直降一直降一直降~
降個不停~~




using System.Text.RegularExpressions;
MatchCollection youtube = Regex.Matches("source", "Regular Expression" , RegexOptions.None);
foreach (Match m in youtube)
{
id = m.Groups["id"].Value;
address = m.Groups["address"].Value;
title = m.Groups["title"].Value;
}
(?<title>[\w]*)
public static string Escape(string str)
{
if (str == null)
return String.Empty;
StringBuilder sb = new StringBuilder();
int len = str.Length;
for (int i = 0; i <len; i++)
{
char c = str[i];
//everything other than the optionally escaped chars _must_ be escaped
if (Char.IsLetterOrDigit(c) || c == '-' || c == '_' || c == '/' || c == '\\' || c == '.')
sb.Append(c);
else
sb.Append(Uri.HexEscape(c));
}
return sb.ToString();
}
public static string UnEscape(string str)
{
if (str == null)
return String.Empty;
StringBuilder sb = new StringBuilder();
int len = str.Length;
int i = 0;
while (i != len)
{
if (Uri.IsHexEncoding(str, i))
sb.Append(Uri.HexUnescape(str, ref i));
else
sb.Append(str[i++]);
}
return sb.ToString();
}
InputLanguageCollection ilc = InputLanguage.InstalledInputLanguages;
foreach (InputLanguage il in ilc)
{
//中文 (繁體) - 美式鍵盤
//中文 (繁體) - 注音
//中文 (繁體) - 新注音
if (il.LayoutName == "中文 (繁體) - 新注音")
{
InputLanguage.CurrentInputLanguage = il;
}
}