I’ve been using HTMLViewer to get the source and then regex to get the elements. This works well except for when the source has spaces and line feeds. Is there a good way to remove the blank lines and trim the spaces off of the end so it’s easier for me to use regex to get the elements. This is a Windows app. Below is my code to populate a textarea(txtSource.Text). Below that is what the source looks like with the blank lines and spaces. It’s difficult to get the "div class=“friend-name” when the innertext is spaced out over the next 4 lines. Any help would be great, thanks.
–CODE
txtSource.Text = “”
dim b as ChromiumBrowserMBS = HTMLViewer1.ChromiumBrowserMBS
if b<>Nil then
dim m as ChromiumFrameMBS = b.mainFrame
if m<>Nil then
dim t as string = m.Source
txtSource.Text = t
end if
end if
---HTML
<td class="runner-name-column">
<div class="owner-name">Joe Shmo</div>
<div class="runner-name">Name of Person</div>
<div class="friend-name">
B,
M,
2015,
Test Data
</div>
</td>