What is a regex template for html tag in java or android?

I have this tag as an input tag:

<a href="controller.jsp?sid=127490C88DB5&R=35144" class="11-link-dkred-bold"><b>Mr. John Q. Anderson&nbsp;&nbsp;&nbsp;MBA 1977 E</a>

in this i want to get the value

Mr. John Q. Anderson MBA 1977 E

wat does patten matter for this in regex?

-1
source share
2 answers

This is a very bad TM idea for parsing HTML using regular expressions, as it is not a common language. You better do this neatly (to clear it up), then use an XML parser or use XPath.

Otherwise, a matching template with entries:

<.*?>\([^<]+\)</.*?>

EDIT

, HTML ! </b>. , , , . . , <b>...</b>, :

<.*?><b>\([^<]+\)</b></.*?>
+8
+2

All Articles