in reply to Re^2: Converting multiple spaces to nbsp
in thread Converting multiple spaces to nbsp
oo! That's unexpected! I didn't realize that the previous substitution failed to affect (?<=...). s/(?<=\s)\s/ /g had occured to me, but I had dismissed it. ++!
local $\ = "\n"; local $_ = ' '; s/(?<=\s)\s/ /g; print; print($_ eq ' ' ? 'correct' : 'wrong'); __END__ correct
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Converting multiple spaces to nbsp
by Smylers (Pilgrim) on Jun 17, 2005 at 15:17 UTC | |
by ikegami (Patriarch) on Jun 17, 2005 at 15:27 UTC |