🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.ruby
Article #1064

Re: jak przeczesać tekst i wyłuskać dane?

#1064
From: shaman
Date: Tue, 13 May 2008 08:57
21 lines
1617 bytes
Wojciech Piekutowski pisze:
> On May 9, 1:14 pm, shaman <no...@nowhere.com> wrote:
>> Wojciech Piekutowski pisze:
> 
> Rozwiązań jest tysiące. Zależy co dokładnie chcesz zrobić. Być może
> String#scan odpowiada twoim potrzebom.

Chciałem zrobić dokładnie to co napisałem - przelecieć tekst i wyczesać 
dane odpowiadające wyrażeniu. Ostatecznie stanęło na takiej konstrukcji:

  body = http_response.body
  body.scan(pattern) do |a, b, c|
    puts a << ' ' << b << ' ' << c;
    ...
    ...
  end

Na razie mnie to satysfakcjonuje :)

PZDR
Shaman
Technical Details
Message-ID: <g0bl6q$5ph$1@news.telbank.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.telbank.pl!not-for-mail
References: <g011hi$ihe$1@news.telbank.pl> <b69335d6-7702-4f66-8943-ee46eab45c2b@8g2000hse.googlegroups.com> <g0185k$iql$1@news.telbank.pl> <f4c0aaf6-a39f-4f40-bdd1-4bfddd494eaa@b1g2000hsg.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.telbank.pl!not-for-mail
From: shaman <noone@nowhere.com>
Newsgroups: pl.comp.lang.ruby
Subject: Re: jak przeczesać tekst i
 wyłuskać dane?
Date: Tue, 13 May 2008 10:57:59 +0200
Organization: BPTNet - http://www.telbank.pl
Lines: 21
Message-ID: <g0bl6q$5ph$1@news.telbank.pl>
References: <g011hi$ihe$1@news.telbank.pl> <b69335d6-7702-4f66-8943-ee46eab45c2b@8g2000hse.googlegroups.com>  <g0185k$iql$1@news.telbank.pl> <f4c0aaf6-a39f-4f40-bdd1-4bfddd494eaa@b1g2000hsg.googlegroups.com>
NNTP-Posting-Host: nc.kir.pl
Mime-Version: 1.0
X-Trace: news.telbank.pl 1210669082 5937 193.27.6.21 (13 May 2008 08:58:02 GMT)
X-Complaints-To: usenet@news.telbank.pl
NNTP-Posting-Date: 13 May 2008 08:58:02 GMT
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
In-Reply-To: <f4c0aaf6-a39f-4f40-bdd1-4bfddd494eaa@b1g2000hsg.googlegroups.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit