Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Regex Problem

Hi guys,
I built a regex
Code
<span dir=\"ltr\">([a-zA-Z0-9']+)</span>

that should give me the span's inside an html and i went to site called regex tester and it gave me 6 matches but when im
putting it in my c# code it gives me none

CODE C#:
Code
WebClient client = new WebClient();
            string html = client.DownloadString(@"My url");

            Regex r = new Regex("<span dir=\"ltr\">([a-zA-Z0-9']+)</span>");
          
            
                foreach (Match t in r.Matches(html))
                {
                    Console.WriteLine(t.ToString());
                  
                }

Thanks for all the help
you add extra ' [a-zA-Z0-9']
[Image: bitcoin.png] Be Nice For Once 15hVUVz7xA4kazHdk2BuErENGCskVwjYXP
(May 9, 2019 11:19 AM)HFDone Wrote:  you add extra ' [a-zA-Z0-9']

No i didnt i want to take the char ' as a possibilty


Never mind the problem was in the html string


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by i3urnApr 12, 2017 11:03 AM 4 156 Apr 12, 2017 11:03 AM
Last Post: Owl
[.NET] by WhatIsRSOct 31, 2016 07:51 PM 7 248 Oct 31, 2016 07:51 PM
Last Post: Ninja
[C#] by dark.teamOct 27, 2015 06:55 AM 3 82 Oct 27, 2015 06:55 AM
Last Post: dark.team