On Thu, 24 Mar 2005 18:09:50 +0900, Sam Kong <sam.s.kong / gmail.com> wrote: > To extract url's from an html source which includes list of sites. > They are formatted like <a href="something.html">. > But I wanted to exclude <a href="index.html"> from the list. > So (?!index.html) will do. does this help? ary=%w(a.html index.html other.txt evil.html.exe stuff.html) ary.select{|s| s =~ /\A(?!index).*\.html\z/ } #=> ["a.html", "stuff.html"] -- Simon Strandgaard