From: "Carlo E. Prelz" Date: 2013-02-28T15:49:46+09:00 Subject: Re: Match array1 with array2 Subject: Match array1 with array2 Date: gio 28 feb 13 02:48:43 +0900 Quoting Mattias A. (lists@ruby-forum.com): > I have array1 that contains several web address. Array2 contains the > expected endings of array1 values. How can I control that arrays2 values > are in array1? > > array1 = ["https://..../page.html, https://..../page1.html, > https://..../page3.html] > > array2 = ["page.html", "page2.html", "page3.html", "page4.html"] Use method String#end_with? Carlo -- * Se la Strada e la sua Virtu' non fossero state messe da parte, * K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe * di parlare tanto di amore e di rettitudine? (Chuang-Tzu)