ARRRGGGG!!!! Typo $list =~ s|((?!.)/)?\b$name\b/?||;
----- Original Message ----- From: "Tanton Gibbs" <[EMAIL PROTECTED]> To: "Tanton Gibbs" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December 11, 2002 3:09 PM Subject: Re: Removing a name from a list - advanced regexp - TIMTOWTDI > Forget that...this works in all cases: > > $list =~ s|((?!.)/)\b$name\b/?||; > > ----- Original Message ----- > From: "Tanton Gibbs" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Wednesday, December 11, 2002 3:06 PM > Subject: Re: Removing a name from a list - advanced regexp - TIMTOWTDI > > > > > In a message dated 12/11/2002 11:54:48 AM Pacific Standard Time, > > > [EMAIL PROTECTED] writes: > > > > > > > > > > What about just > > > > $list =~ s|/?$name/?|| > > > > > > If $name appears in the middle of the list, this removes both '/' > > characters. > > > This was my first guess as well. > > > > Ah, didn't think about that one :) > > > > Well then...why not > > $list =~ s|/?\b$name\b||; > > > > I'm not sure what you want to do when the list only contains one > > element...but this will work in all but that case. > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]