format pythonic superscript in html way : From a file, I have got strings like:

    4f^145d^66s^2

I have to format that in a html compatible way as:

    4f<sup>14</sup>5d<sup>6</sup>6s<sup>2</sup>

So that it looks like: 4f<sup>14</sup>5d<sup>6</sup>6s<sup>2</sup>

This is an example and I have to format hundreds of them, so, doing it manually is not possible.

What I have to do is replace `^` with `<sup>`(which is not problem); **find the next `[a-z]`, and insert `</sup>` one letter before that**(this is the problematic part), or at the end of the string.

How I can do that?


