Problem with pattern matches for checked items in listview

Hi guys,

I need your help, I have a problem with the matches pattern for the checked items in the listview. I couldn't be able to find the solution by when I selected the checkboxes items in the listview and when I clicked on the button, the messagebox is suppose to be displaying but nothing have happens.

What I am trying to achieve is to find the matches in pattern that I have ticked the checkboxes items in the listview, then find the strings in my website that matched with the checked items in the listview and find the html tags id from the html source, e.g: [url]www.mysite.com/images?user=tester&id=1[/url]. Then display the messagebox.

PHP:
[PHP]<p id="images"> <a href="images.php?id=?">Images</a></td>[/PHP]

The Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
private: System::Void Button1_Click(System::Object^  sender, System::EventArgs^  e) {


			 for each (ListViewItem ^item in this->listView1->CheckedItems)
			 {
				 try
				 {
					 String ^URL1 = "http://www.mysite.com/link.php?user=tester";
					  HttpWebRequest ^request1 = safe_cast<HttpWebRequest^>(WebRequest::Create(URL1));
					  HttpWebResponse ^response1 = safe_cast<HttpWebResponse^>(request1->GetResponse());
					  StreamReader ^reader1 = gcnew StreamReader(response1->GetResponseStream());
					  String ^str1 = reader1->ReadToEnd();
					  String ^pattern1 = item->Text + "(<p id='images'>(.*?)</p>)";
					  MatchCollection ^matches1 = Regex::Matches(str1, pattern1);
					  Match ^m1 = Regex::Match(str1, pattern1);


					 for each (Match ^x1 in matches1)
					 {
						 array<String^> ^StrArr1 = x1->Value->ToString()->Split();
						 String ^test = (URL1 + x1->Value->ToString());
						 MessageBox::Show(test);
					 }
				 }
				 catch (Exception ^ex)
				 {

				 }
			 }

		 }


I am definately sure that the html tags has the correct tags name.

Any idea?
two days have passed and no one have reply. do anyone know how to fix this?
Almost nobody here knows C++/CLI. Post @ the MSDN forums instead.
CLI is actually not C++, it is an made by microsoft with "C++-like" syntax

CMIIW
Thanks for the help guys. I will try on microsoft forum so thanks anyway...
Topic archived. No new replies allowed.