NYCPHP Meetup

NYPHP.org

[nycphp-talk] [OT] grep assistance

Peter Sawczynec ps at pswebcode.com
Tue Sep 26 07:29:41 EDT 2006


Four grep regular expressions I could use help with...
 
1) match all id numbers between 100 and 199
2) match all id numbers less than 550
3) match all id numbers greater than 550
4) match all id numbers from 0-550, but not 400-480
 
thanks if these are right at your fingertips.
 
 
For extra special, extra credit what is the following regexp expected to
match.
([1-9]|[1-9][0-9]|[1-3][0-9][0-9]|4[0-6][0-4])$
 
I see it as match any id in several ranges: 1-9, 10-99, 100-399, 400-464.
But there must be a more effective say to say this?
 
Warmest regards, 
 
Peter Sawczynec 
Technology Director 
PSWebcode 
_Design & Interface 
_Ecommerce 
_Database Management 
646.316.3678 
ps at pswebcode.com 
www.pswebcode.com <http://www.pswebcode.com/>  
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20060926/183a98c5/attachment.html>


More information about the talk mailing list