diff --git a/user_guide_src/source/incoming/routing.rst b/user_guide_src/source/incoming/routing.rst index b7a4d738debb..8320bd1b4b16 100644 --- a/user_guide_src/source/incoming/routing.rst +++ b/user_guide_src/source/incoming/routing.rst @@ -122,10 +122,10 @@ is allowed, as are back-references. .. important:: Note: If you use back-references you must use the dollar syntax rather than the double backslash syntax. A typical RegEx route might look something like this:: - $routes->add('products/([a-z]+)/(\d+)', '$1::id_$2'); + $routes->add('products/([a-z]+)/(\d+)', 'Products::show/$1/id_$2'); -In the above example, a URI similar to products/shirts/123 would instead call the “\Shirts” controller class -and the “id_123” method. +In the above example, a URI similar to products/shirts/123 would instead call the ``show`` method +of the ``Products`` controller class, with the original first and second segment passwed as arguments to it. With regular expressions, you can also catch a segment containing a forward slash (‘/’), which would usually represent the delimiter between multiple segments.