From: Robert Klemme Date: 2003-03-21T03:18:46+09:00 Subject: Re: How to process a long string ( get some parts ? ) Administrator@BOND ~/bin/test $ cat href.rb def links(fileName) text = File.open(fileName) do |f| f.readlines.join end text.scan(/ Administrator@BOND ~/bin/test $ ruby href.rb http://foo.bar http://foo.baz Administrator@BOND ~/bin/test $ "RaymondLHW" schrieb im Newsbeitrag news:b5cri9$27p391$1@ID-157330.news.dfncis.de... > if I get the content of a HTML file and put in a string > how can I get all the links inside and store them in array ( or any kind of lists ) ? > > I use regular expression , but if I use .match function, the result is "Match" type , I can't use "gsub" or "sub" to process it > > please give me some advice > > thank you