That won’t work, it will convert to foo-20bar, the regex specifically replaces non-alphanumeric characters with “-”.
Tagging is not setup to handle spaces at all. It would be a fair amount of work, as you’d also have to potentially update the routing for the tag related pages/filters.