public static function getUri($index, $regex = ".*") {
		if(self::$uri === array())
			self::$uri = explode("/", trim($_GET['dachi_uri'], " \t\n\r\0\x0B/"));

		if(isset(self::$uri_variables[$index]))
			if($regex == ".*" || preg_match("/^" . $regex . "$/i", self::$uri_variables[$index]))
				return self::$uri_variables[$index];


		if(isset(self::$uri[$index]))
			if($regex == ".*" || preg_match("/^" . $regex . "$/i", self::$uri[$index]))
				return self::$uri[$index];

		throw new InvalidRequestURIException;
	}
public static function getUri($index, $regex = ".*") {
		if(self::$uri === array())
			self::$uri = explode("/", trim($_GET['dachi_uri'], " \t\n\r\0\x0B/"));

		if(isset(self::$uri_variables[$index]))
			if($regex == ".*" || preg_match("/^" . $regex . "$/i", self::$uri_variables[$index]))
				return self::$uri_variables[$index];


		if(isset(self::$uri[$index]))
			if($regex == ".*" || preg_match("/^" . $regex . "$/i", self::$uri[$index]))
				return self::$uri[$index];

		throw new InvalidRequestURIException;
	}
public static function getUri ( $ index , $ regex = ".*" ) { if ( self :: $ uri === array ( ) ) self :: $ uri = explode ( "/" , trim ( $ _GET [ 'dachi_uri' ] , " \t\n\r\0\x0B/" ) ) ; if ( isset ( self :: $ uri_variables [ $ index ] ) ) if ( $ regex == ".*" || preg_match ( "/^" . $ regex . "$/i" , self :: $ uri_variables [ $ index ] ) ) return self :: $ uri_variables [ $ index ] ; if ( isset ( self :: $ uri [ $ index ] ) ) if ( $ regex == ".*" || preg_match ( "/^" . $ regex . "$/i" , self :: $ uri [ $ index ] ) ) return self :: $ uri [ $ index ] ; throw new InvalidRequestURIException ; }
Get a section of the URI

The URI is split by the '/' character.

@param  string $index The index to retrieve
@param  string $regex The regular expression pattern the index must conform too
@throws InvalidRequestURIException The specified index was not found or did not conform to the regex.
@return string
Get a section of the URI