Assume I have the following two example pieces of HTML:
<p>This is some text: <b>ABCD12345</b></p>
<p><b>Name:</b> John Doe</p>
I'm able to separate the <b> and non-<b> parts, but I (also) want to know how to determine whether the <b> part is at the start or at the end of the text (in other words; whether it has text before or after). How to do that?
I'm using Python (with lxml) if it matters (I don't think it really does).