PDA

View Full Version : Reg expressions specify range


Silver Machine
01-16-2004, 03:47 PM
Is is possable to use regular expressions to check numbers fall with in a range i.e. between 5.5 and 9.1 I can check for the numbers and decimals but wondered if I could specify the range? Any one know? I have looked around and cannot find anything.
Thanks Chris

Jeff Mott
01-16-2004, 03:55 PM
If you think about it long enough I'm sure you could come up with something, but it is silly to try since you have the greater-than and less-than operators at your disposal.if ($x > 5.5 and $x < 9.1) {
# do something
}

Silver Machine
01-16-2004, 04:15 PM
I new there would be something but it never occured to me to do it like that thanks a lot Chris