6-12-2008 19:13:53
ví dụ lấy tất cả các thẻ <a> trong html
thì dùng
Regex re = new Regex("<a.*?>", RegexOptions.IgnoreCase);
MatchCollection matches = re.Matches(text);
Còn lấy tất cả các thẻ div thì dùng như sau
Regex re = new Regex("<div.*?>", RegexOptions.IgnoreCase);
MatchCollection matches = re.Matches(text);
Cứ thế mà phát huy.
---
Coding for food
http://yenbai.awas.vnhttp://tknd.vn