I have this regular expression:
company/(.*)-f(\d+).html$ company/view/$2
In view method of company class I use $this->uri->segment(3)
to get the value of $2
; I can't understand why can't get the value of $2 just like variable.
public function view($param)
{
echo $param; // no value returned
$this->uri->segment(3) // works fine
}