File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes RegEx Validation for a numeric range Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "RegEx Validation for a numeric range" Watch "RegEx Validation for a numeric range" New topic
Author

RegEx Validation for a numeric range

S bitz
Ranch Hand

Joined: Jan 20, 2006
Posts: 80
Hi,
I am totally unexposed to RegEx in any form and i have to solve this problem
:
If i have a number X, i want X to be a two digit number within this range
01 < X < 32
I have tried some reg-expressions but nothing seems to be working.
Can anyone help me with this ?

Thanks
Bitz
[ August 17, 2006: Message edited by: S bitz ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You try [1-31]?

Eric
S bitz
Ranch Hand

Joined: Jan 20, 2006
Posts: 80
Hi Eric,
Well your idea would've worked fine if the requirement was just for any number between 1-32, but the requirement here is that it should be a two digit number and if it is a number between 1 - 9 then it should be written like 01 or 02 or 09...
Hope you've got the situation now.

Thanks
Bitz
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RegEx Validation for a numeric range