Hi
I want regular expression that allows both integer & decimal number only??
Thanks
Regular expression for number
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Nov 30, 2013, 12:15 AM EST
^[1-9]\d*(\.\d+)?$
or
^\d*[0-9](|.\d*[0-9]|)*$