is it possible to have regex in Python that satisfies all the below STRING conditions?
1,000
1,000.00
$1,000.00
1000
-1000
I have the below but it doesn't satisfy all conditions:
if bool(re.compile(r"^\+?\-?\d*[.,]?\d*\%?$").match(text.strip())) == True:
print ("Matched")