--- Begin Message ---On Fri, Jun 18, 2004 at 12:43:31PM -0400, [EMAIL PROTECTED] wrote: > According to the principle of \b why is this doing this? > > $word = "(HP)"; > $word =~ s/[,\]\)\}]\b//; > $word =~ s/\b[,\]\)\}]//; $word = '(HP)'; $word =~ s/^\(|\)$//g; # remove parren @ beginng and end. ^ = beginning of line $ = end of line. or $word =~ s/[\(\)]//g; to remove all parens on a line. I am not sure why you are trying to the backspace in the reg exp with \b.> A second question. If I want to get rid of any non numeric > and non alphabetic before and after a word, but not what's > in the middle (like apostrphes, dashes) of the word, what's > the most simplest way that works. not testid $word =~ s/^[^\w\d]|[^\w\d]$//; ^ symbol when its inside brackets means not. otherwis it means beggining of line. Paul KrauspgpVRWkYVNEXb.pgp
Description: PGP signature
--- End Message ---
pgpmyCGZibJpz.pgp
Description: PGP signature