in reply to Re: question regarding slices
in thread question regarding slices

Your RE will skip any one- or two-letter entries, not just . and .., since . in an RE means "any character." I think you meant /^\.\.?$/.