--On Donnerstag, 15. November 2001 11:37 -0500 "Miretsky, Anya" 
<[EMAIL PROTECTED]> wrote:

> I am trying to replace all occurences of the word St with St. without
> generating St.. in the incorrect substitutions of St.
>
> The code I have been playing with is something like:
>
> $item = "35 Main St." (it could also be "35 Main St" in which case I want
> the substitution to happen)
>
> $varS = "st";
> $item =~ s/\b$varS(^.|\W)\b/St./gi;
>
if ($item =~ /\b(st)\b/i) { $item =~ s/$1/St\./g;}

Birgit Kellner



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to