From: nobuyoshi nakada Date: 2005-06-10T14:22:27+09:00 Subject: Re: newbieQ: new array from old array w regex Hi, At Fri, 10 Jun 2005 13:15:28 +0900, Charles L. Snyder wrote in [ruby-talk:145032]: > This only gives me the entire contents of the address node - how do I > extract only the zip codes (preferably putting them in an array). My next > step is to end up with a hash table of unique zipcodes and their frequency > of occurrence... Enumerable#each just returns the receiver itself. puts mylist.grep(/b\d{5}-\d{4}\b|\b\d{5}\b/) -- Nobu Nakada