|
I did indeed DaWei, but there are certain things about its behavior which didn't seem correct. Take for instance the basename function, if I use that but the file doesn't have a '.***' extension it returns what I would interpret as a directory name. If the pathname starts with a '/' it also considers it ok. For my purposes those things don't work. I tried using pathinfo at first, but with certain pathnames the behavior is kinda screwy and I have to worry about these exceptions which kind of extends my code needlessly I think. I may not be using it properly I have no clue, but thus far the preg_match is working exactly as I want. Also, pathinfo doesn't check for the non-compliant characters and their positions. I figured with preg_match I could do all of these things in one shot rather than having to code for all the possibilties that transpire using pathinfo. I'm not one for abusing regular expressions especially since I don't really feel comfortable using them, but I do recognize their versatility in certain applications.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis
|