I’m trying to evaluate an arithmetic operation of prefix type,
“add(multiply(123,432),subtract(add(19,21),124))”, can you make it so
the regex engine scans it backwards?
I’m trying to isolate each word and manipulate it without using split()
and creating another array of o(n) space.
I can parse the string from end to start by character and tokenize it
using string index, but there must be someway to do this using regex
I know that split() creates an array that can be traversed backwards,
but is there anyway to bypass the extra space required by split()? (Does
the ruby interpreter/compiler somehow handle it?)
Ultimately, is there anyway to make scan() parse a string backwards?