From: unbewusst.sein@... (=?ISO-8859-1?Q?Une_B=E9v?= =?ISO-8859-1?Q?ue?=) Date: 2007-09-26T10:40:04+09:00 Subject: Re: ruby regex on html file eggie5 wrote: > I'm trying to write a rake task to extract all the script tags out of > my html file and save them to an array. How can I do this? Is that a solution 4 u ??? : #! /usr/bin/env ruby html = ' ' js = [] html.each {|l| js << l.chomp.gsub(/.* src="(.*[^ ])"[ >].*/, '\1').gsub(/(.*)" type=.*/, '\1') if /