I have a string that will be mixed with text and html markup that I would like to parse and deal with accordingly. The HTML markup with include references to record ID's that I can use later when compiling text and mention segments for a post.
For the most part, I'm understanding how to split out the individual segments, but I don't know how to get them back in the correct order in which they came.
An example string:
Hi <span contenteditable="false" data-mention="@005i0000003KteOAAS">First Name</span>
I can parse into 'Hi '
and '005i0000003KteOAAS'
individually, but how do I get them back in the original order?
I'm using a regex like this currently:
<(?i).*?<\\/.*?>