For a do-it-yoursel solution, you will need
- a tiny parser to extract the polynomial coefficients (a regular expression analyzer could probably do);
- a root finder; if you limit yourself to the 4th degree, analytic formulas are available
http://mathforum.org/dr.math/faq/faq.cubic.equations.html[
^]; otherwise you'll need an algorithm from numerical analysis.
http://en.wikipedia.org/wiki/Root-finding_algorithm#Finding_roots_of_polynomials[
^] (Caution, this material might horrify you.)
If you explain the exact purpose, maybe shortcuts are possible...