I need to match the following values and my current Regular Expression can’t seem to get % values to be matched or numbers without - and $
Values I need a matched:
$123.45 – Match
-$123.45 – Match
123.45 – Needs Matched
-123.45 – Match
.99 – Needs Matched
-.99 – Match
7% – Needs Matched
-7% – Needs Matched
500 – Needs Matched
Regular Expression:
^[-$][$]?\d*(?:\.\d{0,2})?$
Here you go: