public function match($regex = '', $true = true, $false = "")
    {
        return preg_match("~{$regex}~", $this->path) === 1 ? $true : $false;
    }
public function match($regex = '', $true = true, $false = "")
    {
        return preg_match("~{$regex}~", $this->path) === 1 ? $true : $false;
    }
public function match ( $ regex = '' , $ true = true , $ false = "" ) { return preg_match ( "~{$regex}~" , $ this -> path ) === 1 ? $ true : $ false ; }
Check if current url matches a given regex.

@param  string $regex
@param  mixed  $true  What return if the compare is true
@param  mixed  $false What return if the compare is true
@return mixed
Check if current url matches a given regex .