JavaScript: replace three spaces with html 160 entity
===

I'm trying to do something like this...

    f = f.replace('   ',' &#160; ','gi');

I've also tried this...

    f = f.replace(/\ {3,}/g,' &#160; ','gi');

How do I replace three spaces with the entity above?

Using \s does not work, I've gone through plenty of other Q&As on Stack and nothing has worked.