I've been lurking here for a few months but this is my first time posting. Im also pretty new in Java so forgive me if this question is too basic
Anyway, i'm writing a program which utilizes a linked list implementation of polynomials, and its working fine; except now im having trouble parsing the user's input. Basically, the users input should be something like; "2x^3 + 3x^5" with as many terms as he wants. My program then needs to split that string into Coefficients and Exponents to feed into the linked list.
so, in the case of 2x^3 + 3x^5, the coefficient would be 2 and associated exponent would be 3; these are then converted into int before being passed. This my problem, as i cant get it working properly. I tried using split and substring but its not working properly.
Any tips, suggestions, examples? Just pushing me along the right path would be appreciated.
Thanks in advance