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
Post a Comment