php - preg_match_all /(\w ):[^\/]/ not work -


i want pattern url : (\w+):[^\/]+ doesn;t work in php :(

in url string : http://azera/admin/filemanager/index/cmd:download/file:rjpcyxplcmfcum91dgvylnhtba==

i must array :

array (size=2)   'cmd' => string 'download'   'file' => string 'rjpcyxplcmfcum91dgvylnhtba==' 

but php returns null ! php code :

preg_match_all('/(\w+):[^\/]+/',$url,$passedargs);              // passedargs 

how can fix ?

i'm not sure mean null!, want array:

array (size=2)   'cmd' => string 'download'   'file' => string 'rjpcyxplcmfcum91dgvylnhtba==' 

while regex: (\w+):[^\/]+ capturing cmd , file. need change regex to:

\w+:([^\/]+) 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -