Split text on markup in Python
Split text on markup in Python Question: I have the following line of text : <code>stuff</code> and stuff and $LaTeX$ and <pre class="mermaid">stuff</pre> Using Python, I want to break the markup entities to get the following list: [‘<code>’, ‘stuff’, ‘</code>’, ‘ and stuff and $\LaTeX$ ‘, ‘<pre class="mermaid">’, ‘stuff’, ‘</pre>’] So far, I used : …