From: Azalar --- Date: 2008-09-08T02:46:12+09:00 Subject: Re: regular expression match and exclude I should mention that image isn't a fixed word in this case I just used that as an example. It represents whatever the name of the image is So the test data could be.. galleries/blah.jpg galleries/blahthumb.jpg galleries/landscape.jpg galleries/landscapethumb.jpg galleries/foo.jpg galleries/foothumb.jpg Robert Klemme wrote: > 2008/9/7 Azalar --- : >> >> The array is created when i use the scan method so if i used reject it >> would become a two pass process which is what i am doing anyway so I was >> wondering if regular expressions had built in support for this. > > Will be hard. It's easier if you do > > %r{galleries/image\d+\.jpg\z} > > Kind regards > > robert -- Posted via http://www.ruby-forum.com/.