One thing though: Your regex supports both single and double quote, but a double quote can terminate a string started with single quote. This leads to problems with code like the following: 

```
param='and" dg=' abc="d"
```
With your current regex, the `dg=' portion is leftover, though I'd expect it to be part of `param`.

Do you have a fix for this, god of regex? Or drop single-quote support?