Guys I really not understand about regex, I'm using ant-design Input Number component to make a currency filter.
currently this is like this:
<InputNumber
style={{ width: 175 }}
formatter={value => `R$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g,
".")}
parser={value => value.replace(/[A-Z]|[a-z]|[$ ]|\.+/g, "")}
onChange={(value) => setSelectedKeys(value ? value : [])}
/>
The current format, for exemple thousand five hundred is like this : 1.500 I need it to accept as well, negatives numbers (-1.500) and comma for the cents like 1.500,25
Can you guys help me ? I've try some solutions but can't make it work as I need