You need to learn how Regexes work:
\s[^']+/g
specifically matches "whitespace followed by any number of characters that isn't a quote but at least one, followed by a slash, followed by a g" because looking at you question history, you are just copy'n'pasting stuff, without trying to understand how they work when they need changing.
I'd suggest that you read up on how they work:
JavaScript RegExp Reference[
^] and get a copy of
Expresso[
^] - it's free, and it examines, tests, and generates Regular expressions.