I Just Asked this question for objective-c here, but need the answer quick and am able to do the parsing in either objective-c or javascript, so I will ask for js here.
In my app the user will be inputting a mathematical expression as a string, such as n*3/7+9-5
, and I need to be able to get the polynomials from that string, like 4, 3/7, 0, 0, 0, 0
, is there a way to do this or a library that will do this in javascript? I am using node, so preferably something that is node compatible.
I have done some research on google, but there appears to be nothing, and I have no idea how to go about writing it myself.