Hi,
i have a regular expression to remove certain parts from a URI. However it doesn't take into account multiple parts in a way that works :-). Can somebody assist?
$regex = '~/{(.*?)}\*~'
$uri = '/user/{action}/{id}*/{subAction}*';
$newuri = preg_replace($regex, '' , $uri);
//$newuri = /user/
//Should be: $newuri = /user/{action}/
I know it matches the following part as one match:
/{action}/{id}/{subAction}
But it should match the following two seperately:
/{id}*
/{subAction}*