As part of the project for school, I need to replace the line from the form:
5 * x^3 - 6 * x^1 + 1
to something like:
5x<sup>3</sup> - 6x<sup>1</sup> + 1
I believe that this can be done with regular expressions, but I still don't know how to do it.
Can you lend me a hand?
PS The actual purpose is to implement an application for processing polynomial Java processing, and I use this to pass polyomial.toString () from the model to the view, and I want it to be displayed using the html tags beautifully.
java regex
Dan Mar 10 '09 at 20:46 2009-03-10 20:46
source share