I have a HTML file and I am trying to retrieve valid innertext from each tag. I am using Regex for this with the following pattern:
(?<=>).*?(?=<)
It works fine for simple innertext. But, I recently encountered following HTML pieces:
<div id="mainDiv"> << Generate Report>> </div>
<input id="name" type="text">Your Name->></input>
I am not sure, how to retrieve these innertexts with regular expressions? Can someone please help?
Thanks