I'm trying to make a functional component that basically converts ^ and _ characters in a string to sub and super scripts. Here are some examples.
'example_3' -> <h1>example<sub>3<sub/><h1/>
should start a tag at a '_' or '^' and close the tag at the next non-number character.
'another_1234Example' -> <h1>another<sub>1234<sub/>Example<h1/>
also should be able to work for any amount of numbers
'something^2else_34' -> <h1>something<sup>2<sub/>else<sub>34<sub/> <h1/>