Suppose I have '/srv/www/site.com/htdocs/system/application/views/' and want to test it against a regexp that matches each directory name in the path?
Something like this pattern: '(/[^/])'
That yields an array with 'srv','www','site.com'... etc.
PS: the regexp syntax I wrote is just to illustrate, it's not tested and surely wrong, but just to give an idea.
PS2: I know there's explode() but let's see if we can do this with a regexp (it's useful for other languages and frameworks which don't have explode).