How can I get values from string and put it into an associative array, where the key must be given wildcard string.
Given template is:
param1/prefix-{wildcard1}/{wildcard2}/param2
Given string is:
param1/prefix-name/lastname/param2
The result must be
array('wildcard1' => 'name', 'wildcard2' => 'lastname');
UPD
I want to implement some route script, and wildcards must be variable names that will be injected to script and they will be loaded dynamically from other classes.