How do I change all parenthesis in a string to a minus sign only when the next character immediately following (
is a number?
input: foo (4,301) bar blah (4)% blah (USD)
output: foo -4,301 bar blah -4% blah (USD)
everything that I have found is relating to getting a number and not changing the string...
num = -int(test.translate(None,"(),"))
that's not what I want