On Jun 2, Siegfried Heintze said:

s/\bJr\b/ Junior /gi;

This is not exactly what I want because it will put a space before "Junior"
even if Junior is at the beginning and I don't want a space?

Just do

  s/\bJr\b/Junior/gi;

The \b is an anchor -- it matches a location, not a character.

--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %    -- Meister Eckhart

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to