Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RegEx Validation for a numeric range

 
S bitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You try [1-31]?

Eric
 
S bitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic