in reply to Regular Expression Help matching white space but not replacing it
Note that this does as you define it: only replace it when surrounded by whitespace. It will not replace the user name if the name starts or ends the line.s/(\s)\Q$user\E(\s)/${1}xxxx${2}/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regular Expression Help matching white space but not replacing it
by elanghe (Novice) on Aug 11, 2010 at 21:36 UTC |