I use the following regular expression to detect negative numbers:
([-]([0-9]*\.[0-9]+|[0-9]+))
But I want to skip the matches followed by $. If I use the following expression:
([-]([0-9]*\.[0-9]+|[0-9]+)[^\$])
It will match the positions correctly, but will contain the next character. For example, in the expression:
-0.6+3 - 3.0$
It will match:
-0.6+
I want to combine only
-0.6
source share