I have a string like
string html = "truongpm<b><i>bold italic</i></b><b>bold</b><i>italic</i>";
How do i get array like
a[0] = "truongpm", a[1]= "<b><i>bold</i></b>", a[2]="<b>bold</b>", a[3]="<i>italic</i>"
from this string. Now i use this code
string tagRegex = @"<\s*([^ >]+)[^>]*>.*?<\s*/\s*\1\s*>";
MatchCollection matchesImgSrc = Regex.Matches(html, tagRegex, RegexOptions.IgnoreCase | RegexOptions.Singleline);
foreach (Match m in matchesImgSrc)
But it just get
a[0]= "<b><i>bold</i></b>", a[1]="<b>bold</b>", a[2]="<i>italic</i>"
there are no "truongpm" Please help me! Thank
[^<>]+|before your current pattern.