I need an expression that will match with any number that may or may not have a + or - before it and also may or may not have a decimal at any before or after any number. .432423 and 42343242. is valid but a single decimal is not, even though with the expression I am running a single decimal is passing my validity test. Please tell me what is wrong with this code rather than giving me an answer. Thank you!
var number = /^((\-|\+)?([\d*\.?\d+])|([\d+\.?\d*]))$/;