Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Regular expression for validating a number
[b][red]This message was edited by ITA at 2004-12-31 8:43:19[/red][/b][hr]
I want to write a regular expression which only allows the user to enter a number, and only a number no text or other chars, into a textbox in a form. The regular expression should not allow spaces to be entered.
I've come up with this:
Is there anything wrong with that? - it seems to work.
Can anyone come up with anything or fix any error I may have made? Please include the reg expression in your reply.