Hi,

I wrote the following code, but I can't get an expeceted result.
..===================== nmatch.rb ========
str = '<html><body>hogeratta</body></html>'
while str =~ /<(\/?\w+)>/ do
    print $1, "\n"
end
..========================================

Expected output:
..----------------------------------------
$ ruby nmatch.rb
html
body
/body
/html
..----------------------------------------

Real output:
..----------------------------------------
% ruby nmatch.rb
html
html
html
 ....	(infinite loop)
..----------------------------------------


Please tell me how to get what I expected.

regards,
makoto