I've currently got the following to remove spaces and replace them with a hyphen.
How can I go about replacing a space with a hyphen and a dot with nothing and keep it in the same variable?

```
url = url.replace(/\s/g, '-');

```