|
Posted by frizzle on 10/12/06 14:44
Hi there,
I'm not really experienced with regexpes etc. so that's why i come
here.
My script needs to parse the requested filename:
Imagine the filename is index_en.html
My output needs to be an array with the following:
language => en (no underscore)
file => index (no "_en")
extension => html
i created the following, but i don't know how to move on:
preg_split( '/^[a-z0-9]*(_(en|_ru))?\.[a-z0-9]{2,4}$/', $filename );
As you can see, the _en part can be left out (index.html) wich would
have to return
language => default
I hope it's clear, cause i really need to get this going!
Thanks.
Frizzle.
Navigation:
[Reply to this message]
|