tags:

views:

107

answers:

2

hi , i wrote simple program for getting info from web

        string loginName = null;
        Regex rloginName = new Regex(@" <tr><td dir='rtl'><h1>(.*?)</h1><br /></td></tr> <!--.............. Titel der Referat ..............-->");

        Match mloginName = rloginName.Match(source);
        if (mloginName.Success)
        {

        }

ok i test this on RegexBuddy 3 every thing is fin but in my code cant get something too return ,

so where is my code problem

here is code :

<tr><td dir='rtl'><h1>xxx:xxx:xxxx:[email protected]</h1><br /></td></tr> <!--.............. Titel der Referat ..............-->     
          <tr><td dir='rtl' style='text-align: justify'>

and i want get

xxx:xxx:xxxx:[email protected]
A: 

So is there no whitespace/new lines in the web page?

Fry
+2  A: 

It's the tiny whitespace at the start of your Regex pattern. If you remove it, you can get what you want using mloginName.Groups[1] .

reticent