I have very simple text with HTML (only <b> tag) e.g.
Lorem Ipsum is <b>simply dummy</b> text of the printing and <b>typesetting industry</b>
I would like to split the text to array like this:
[0] - Lorem Ipsum is
[1] - <b>simply dummy</b>
[2] - text of the printing and
[3] - <b>typesetting industry</b>
The text inside HTML tag must be separated from another text. Is there any simple solution for it?
Thank you
Split()function or using regular expressions?[0] - Lorem Ipsum istill you find <b>. When you find <b>, you search for the next </b> and you place the between text in the array[1] - <b>simply dummy</b>and so on. Like a minimal parsing algorithm. This will work if you don't have nested <b>'s.