I have used an expression for validating a positive number as follows:
^\d*\.{0,1}\d+$
when I give it an input of -23, it will mark input as negative, but when I give it an input of +23, it will mark it as invalid number!
what is the problem?
Can anyone give a solution that With +23 it will return (positive)?
Have you considered to use anything beside regular expressions?
If you are using the jQuery Validation Plugin you could create a custom validation method using the Validator/addMethod function:
Edit: Since you want only regular expressions, try this one:
Explanation:
^)\+?)[0-9]*)\.?)[0-9]+)$)