You need to point to class/method ie:
$route['events/(:any)'] = 'class/method/$1';
(:any)
and (:num)
are wildcards. You can use your own patterns.
Take this example(for demonstration purposes):
// www.mysite.com/search/price/1.00-10.00
$route['search/price/(:any)'] = 'search/price/$1';
$1
is equal to the wildcard (:any)
so you could say
public function price($range){
if(preg_match('/(\d.+)-(\d.+)/', $range, $matches)){
//$matches[0] = '1.00-10.00'
//$matches[1] = '1.00'
//$matches[2] = '10.00'
}
//this step is not needed however, we can simply pass our pattern into the route.
//by grouping () our pattern into $1 and $2 we have a much cleaner controller
//Pattern: (\d.+)-(\d.+) says group anything that is a digit and fullstop before/after the hypen( - ) in the segment
}
So now the route becomes
$route['search/price/(\d.+)-(\d.+)'] = 'search/price/$1/$2';
Controller
public function price($start_range, $end_range){}