I have few HTML line like this
<div class="itemA" attr="abc">VALUE I NEED TO GET</div>
<div class="itemA" data-attr="def">VALUE I NEED TO GET</div>
<div class="itemA" something-else="xyz">VALUE I NEED TO GET</div>
<div class="itemA" other="123">VALUE I NEED TO GET</div>
<div class="itemB">VALUE I DONT NEED TO GET</div>
<div class="itemB">VALUE I DONT NEED TO GET</div>
I know the way to get string value between two character in regular expression be like:
(?<=[char1]).*?(?=[char2])")
When I use this
Regex.Matches([HTML_ABOVE], @"(?<=class=""itemA"")(.*?)(?=</div>)")
Return be like:
attr="abc">VALUE I NEED TO GET
data-attr="def">VALUE I NEED TO GET
something-else="xyz">VALUE I NEED TO GET
other="123">VALUE I NEED TO GET
Is there anyway to ignore or remove pre-characters ?