Fixed bug when combining index and operator

Switched to using regexp to parse nodes.