Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Regular expression to allow only integer and decimal numbers.

inDiscoverJul 15 2014 — edited Jul 15 2014

Hi All,

I need a regular expression to allow only integer and decimal numbers.

Examples :

100 - allowed

100.00 - NOT allowed

100. -NOT allowed

100.11.22 - NOT allowed

all characters other than numbers - NOT allowed

I used the regular expression - ^[0-9]+\.?[0-9]*$ - but its allowing "100." also.

Any one can help me resolve this.

Your timely help is greatly appreciated.

Thanks in advance.

This post has been answered by Frank Kulash on Jul 15 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2014
Added on Jul 15 2014
6 comments
3,091 views