I hope you can help me, I am capturing what is written in a component and I need that after the point comes out, it only allows me to type two more numbers
event.target.value = event.target.value.replace(/[^0-9.]+/g, '').replace(/\B(?=(\d{2})+(?!\d))/g, '.')
1.11 ✓
11.11 ✓
1.112 x => 1.11 => replace 2->''
I only need to validate the last option in that expression so that it does not allow me to type or it is replaced with '' if I try to type something else