src/Router.php
public function addPatternMatcher(string $alias, string $regex) : self
    {
        $pattern = '/{(.+?):' . $alias . '}/';
        $regex   = '{$1:' . $regex . '}';

        $this->patternMatchers[$pattern] = $regex;

        return $this;
    }
public function addPatternMatcher(string $alias, string $regex) : self
    {
        $pattern = '/{(.+?):' . $alias . '}/';
        $regex   = '{$1:' . $regex . '}';

        $this->patternMatchers[$pattern] = $regex;

        return $this;
    }
public function addPatternMatcher ( string $ alias , string $ regex ) : self { $ pattern = '/{(.+?):' . $ alias . '}/' ; $ regex = '{$1:' . $ regex . '}' ; $ this -> patternMatchers [ $ pattern ] = $ regex ; return $ this ; }
Add a convenient pattern matcher to the internal array for use with all routes

@param string $alias
@param string $regex

@return self
Add a convenient pattern matcher to the internal array for use with all routes