Q:

regex to replace "foo-some white space-bar" with "fubar"

I'm a newcomer to regular expressions, and am having a hard time with what appears to be a simple case.
I need to replace "foo bar" with "fubar", where there is any amount and variety of white space between foo and bar.
For what it's worth, I'm using php's eregi_replace() to accomplish this.
Thanks in advance for the help.

A:

... = preg_replace('/foo\s+bar/', 'fubar', ...);

