http://qs1969.pair.com?node_id=363182

TASdvlper has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

Hopefully a quick one for ya. Say I have a string:

my $foo = "the lazy brown fox jumped..."
I want to run a regexp and search for 2 or more consecutive spaces, and if I find it, substitute   for each space. So the above would look like:
my $foo = "the lazy nbsp;brown  &nbspfox  &nb +sp;&nbspjumped..."
Any help would be greatly appreciated.