From: Josh Cheek Date: 2010-03-24T11:37:16+09:00 Subject: Re: what's the matter with my programm:Web Analysis --000e0cd138a0a2d6d3048282b0ad Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Mar 23, 2010 at 7:48 PM, Pen Ttt wrote: > there two bugs in my first program : > 1=E3=80=81it's __END__ not _END_ > 2=E3=80=81it's "elsif" not "elseif" > i change my program into > #the filename is: /home/pt/htmlscan_test.rb > HTMLRegexp =3D/( > > > > there is another problem too: > it can be run on netbeans ide6.8,got correct answer > ["Tag", ""] > ["Tag", ""] > ["Tag", ""] > ["Tag", "< A name=3D\"FOO\" href=3D\"foo\" attr >"] > ["TextData", "foo"] > ["Tag", ""] > ["Tag", "< A name=3D\"BAR\" href=3D\"bar\" attr >"] > ["TextData", "bar"] > ["Tag", ""] > ["Tag", "< A name=3DBAZ href=3Dbaz attr >"] > ["TextData", "baz"] > ["Tag", ""] > ["Comment", ""] > ["Tag", ""] > ["Tag", ""] > > but when i run it on terminal > pt@pt-laptop:~$ ruby /home/pt/htmlscan_test.rb > /home/pt/htmlscan_test.rb:20: syntax error, unexpected '<', expecting > $end > > ^ > > what's the matter? > can you try it on your computer? > please help me. > -- > Posted via http://www.ruby-forum.com/. > > It works for me on 1.8.6, 1.8.7, and 1.9.1 http://img13.imageshack.us/img13/122/picture1svu.png --000e0cd138a0a2d6d3048282b0ad--