in reply to Re^2: Looking for white spaces between words
in thread Looking for white spaces between words
"the lazy brown fox jumped..."
This should work:
$foo =~ s/(?<= )( +)/' ' x length($1)/ge
But I would like to expand the question a bit. I would like to see all spaces removed with the exception of just one separating the words, and then have that replace with the non-breaking space. So:
"the lazy brown fox jumped..."
Can be solved thusly:
I believe this answers both requests unless I am misreading something.$foo =~ s/ {2,}/ /g;
-enlil
|
|---|