function routeStringToRegExp(routeString) {
        routeString = routeString.replace(escapeRegExp, '\\$&')
            .replace(optionalParam, '(?:$1)?')
            .replace(namedParam, function(match, optional) {
                return optional ? match : '([^\/]+)';
            })
            .replace(splatParam, '(.*?)');

        return new RegExp('^' + routeString + '$', routesAreCaseSensitive ? undefined : 'i');
    }
Connects the history module's url and history tracking support to Durandal's activation and composition engine allowing you to easily build navigation-style applications.
@module router
@requires system
@requires app
@requires activator
@requires events
@requires composition
@requires history
@requires knockout
@requires jquery