<?php $str = '/list/page/3'; preg_match('#^/list(?:/type/(\d+))?(?:/page/(\d+))?$#', $str, $matches); var_dump($matches);
You have javascript disabled. You will not be able to edit any code.