in reply to Re^2: Grabbing numbers from a URL
in thread Grabbing numbers from a URL

I was immediately thinking that this "number" is intended to be a "unique id number". I suppose that could be a wrong assumption, but in my experience if there is some number like 12389799 and somehow those last 5 digits are "special", then the name should be "....123_89799.htm". My algorithm will work with that. If I have any influence over the file naming convention, I will put an "_" in there to separate the fields. In my opinion, stuff like a fixed 5 digit deal, maybe 00123.html is a very bad idea. Often these software things grow and maybe at some point a 6th digit is needed? Then what? In general, I like the idea of having the basic parsing being one thing and if needed the validation of those fields being a separate thing. If two digits aren't allowed, then if ($number < 100) {}. "....123_89799" and "....123_897" should be valid if the naming convention guy has his eye on the ball. These details DO matter.