Maybe you can write the regex pattern like this:

irb(main):022:0> imgs.each do |s|
irb(main):023:1*   p [s, /^galleries\/((?!thumb).)+\.jpg$/ =~ s]
irb(main):024:1> end
["galleries/blah.jpg", 0]
["galleries/blahthumb.jpg", nil]
["galleries/landscape.jpg", 0]
["galleries/landscapethumb.jpg", nil]
["galleries/foo.jpg", 0]
["galleries/foothumb.jpg", nil]
=> ["galleries/blah.jpg", "galleries/blahthumb.jpg",
"galleries/landscape.jpg", "galleries/landscapethumb.jpg",
"galleries/foo.jpg", "galleries/foothumb.jpg"]


Azalar --- wrote:
> I am parsing a web page full of image links that also contain links to
> the thumbnails for those images.
>
> Here is my test data..
>
> galleries/image1.jpg
> galleries/image1thumb.jpg
> galleries/image2.jpg
> galleries/image2thumb.jpg
> galleries/image3.jpg
> galleries/image3thumb.jpg
>
> If i use this expression..
> /galleries.*(?=thumb).*jpg/
>
> The results are just those lines containing the word thumb.
>
> What I want to do is inverse this though and return only return that
> DONT contain the word thumb.
>