Question: The title says it all. Just to add that the number can be multiple digits.

I'm using the following function:

```
str_replace( "/^\&DaysAgo=d+$/", "", $save_query);

```

Answer: 
After the default installation of 8.0 Update 4 you need to run mongo manually. 

The easiest way is to install mongo by default and run it from command prompt as: mongod.exe --dbpath c:\example\_of\_my\_mongo\_database\_dir 

The best way is to install it as a windows service - <http://mikerobbins.co.uk/2015/02/02/install-mongodb-as-a-windows-service-for-sitecore/>

As soon as you do that - you'll be able to install the packages without any problem.
Navigate to `inetpub\wwwroot\newsxa[Your file]\Website\App_Config\Include` 
where you will find `Sitecore.Xdb.config in line 8` 

```
<setting name="Xdb.Enabled" value="true" />

```

Just make it false

It will install after that.