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: 
For anyone else that has this issue that might be in the same way that I had it. I had the exact same problem, but not quite with the same stack traces as defined above. 

My problem was that I didn't have MongoDB installed/running, and that caused it to hang, throwing many errors in the logs. Doing a simple install and a couple setup commands with the pre-defined connection strings seemed to kick it into gear just fine.
If the Sitecore package zip never finishes installation:
There was a log entry entry: “Job started: WatchStatus”. This Job never ended.

The package is being stored in a temporary folder on my local machine, and instead of running under the NETWORK SERVICE account that the website uses, it runs with IIS\_IUSRS role which did not have modify permissions. I granted modify permissions to this role and the package created as expected.