Ozan Ertürk Ozan Ertürk - 1 year ago 78
C# Question

Regex finding proper pattern for example

I am try to generate a proper pattern. But I couldn't find it.

in this site. i try to capture
enter image description here

I am using c#.
I just created this pattern to capture each lists information's.

string pattern =@"<li class="(odd|even)">(.*)<span class="ch-type">(.*)<\/span>(.*)<span class="ch-time">(.*)<\/span>(.*)<div class="ch-desc">(.*)<span class="ch-name">(.*)<\/span>(.*)<span class="ch-text">(.*)<\/span>(.*)<\/div><\/li>"


Answer Source

Try this code:


Demo: https://regex101.com/r/d8PJa9/2

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download