Regular Expression好強大~
小弟都只拿來分析大量的網頁的資料*0*
1.
using System.Text.RegularExpressions;
2.
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;
}
3.
用一個叫做title的group
(?<title>[\w]*)
沒有留言:
張貼留言