> -----Original Message----- > From: Gibbs Tanton - tgibbs [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 15, 2001 12:08 PM > To: 'Miretsky, Anya '; ''[EMAIL PROTECTED]' ' > Subject: RE: Regulare Expressions/ Substitution Question > > > What you want is a negative lookahead > > $iter =~ s/\b$varS(?!\.)/St./gi; > > That says to find any occurrence of $varS that is preceeded by a word > boundry (so you don't replace things like worst) and is NOT > followed by a .
But that will change "Street" to "St.reet", which I don't think the OP wants. I think the simple s/\b$varS\b/St./gi is all that's needed. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]