Because of C++ code snippets not dealing with multiple +- in sequence (or even negative number) in expressions, I post this, as it is so much easier for me than C/C++.
EDIT: Fixed signs together with '(' issues and '+' at beginning removing without lstrip, removed separate now unused '(' branch from if. Changed name of prev to plusminus.