I would like to match numbers and arithmetic operators and store it into an array.
For example:
let expression = “300-100*400-600+200”
array = [“300″,”-“,”100″,”*”,”400″,”-“,”600″,”+”,”200″]
How can I achieve this?
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
I would like to match numbers and arithmetic operators and store it into an array.
For example:
let expression = “300-100*400-600+200”
array = [“300″,”-“,”100″,”*”,”400″,”-“,”600″,”+”,”200″]
How can I achieve this?