@(raw: String)

<span class="formula">@Html(raw.replaceAll("([A-Za-z\\]\\)])(\\d+)", "$1<sub>$2</sub>").replaceAll("(\\^)(\\d+)", "$1<sup>$2</sup>"))</span>

@(raw: String)

<span class="formula">@Html(raw.replaceAll("([A-Za-z\\]\\)])(\\d+)", "$1<sub>$2</sub>").replaceAll("(\\^)([\\d+-]+)", "<sup>$2</sup>"))</span>

Fix chemical formula regex (superscript part)
Fix chemical formula regex (superscript part)
