Question: If the user inputs "search" and "for" in the userinput i want it to return "search and for both have been input"

however, if the user inputs "search" and "information" in the userinput i want it to return "search and information both have been input"

The problem is, if the user inputs "search information", then python identifies the "for" in "information" and returns "search and for have been input"//. which is not what i want!

What to do?

Have a look at this image for understanding the problem described:
![blah](https://i.stack.imgur.com/0d7KT.png)

Answer: 
Try something like this

```
function listAllRoutes(server){
  console.log('GET paths:');
  server.router.routes.GET.forEach(
    function(value){console.log(value.spec.path);}
    );
  console.log('PUT paths:');
  server.router.routes.PUT.forEach(
    function(value){console.log(value.spec.path);}
    );
}

listAllRoutes(server);

```

This should list all GET and PUT paths, adding POST and DELETE should be easy :)
2019 update: `server.router.routes` is no longer available instead we have `server.router.getRoutes()` which returns a Map. So we can log all the routes using:

```
function listAllRoutes(server) {
  Object.values(server.router.getRoutes()).forEach(value =>
    console.log(
      `ENDPOINT REGISTERED :: ${value.method} :: ${server.url}${value.path}`
    )
  );
}

```

<http://restify.com/docs/server-api/#server>