Question: I want to replace the following types:

```
Some Query String
Some Comma, Separated, Query String

```

With the following:

```
Some-Query-String
Some-Comma-Separated-Query-String

```

Any ideas on the regular expression for this?

Answer: 
This should do what you want `/,?\s+/g`

```
'Some Comma, Seperated, Query String'.replace(/,?\s+/g, '-');
// Will produce: "Some-Comma-Seperated-Query-String"

```
I would just do this:

`'Some Comma, Seperated, Query String'.replace(/,?\s/g, '-');`

Hope that works for you. The question mark means one instance or less