I am trying to create an angular directive to be used with HTML inputs to filter out none numeric characters
Here is my regex I am using to achieve that:
inputValue.replace(/[^0-9\-\.]/g, "").replace(/\.(\.)/g, '$1');
However this regex does not cover these cases:
- --5
- 5.5.6
- -5-5
 
     
     
    