I'm using `preg_replace()` and I need some help. I've been trying to do this for some time and it's time to face facts: I am really bad with regular expressions. I'm not even sure what can and can't be done with them. 

Lets say I want to change the string `dogs` to `cats` no matter how much white space is between them. how do I do it?

```
dogs -> cats
d o g s -> c a t s

```

I have tried:

```
preg_replace("/D\s*O\s*+G/", "cat", $string);

```

and the string comes back with all "d o g" unchanged. 

Next question: Is it possible to ignore characters between letters and not just white space? 

```
d.o g.s -> c.a t.s
dkgoijgkjhfkjhs -> ckgaijtkjhfkjhs

```

And finally, when it comes to whole words, I can never seem to get the function to work either.

```
display: none -> somestring
display    :    none -> somestring

```

Often times I just cause `$string` to return empty.

Thanks in advance.