From: mosfet Date: 2007-03-05T20:55:09+09:00 Subject: ruby noob Hi, I would like to parse a very simple html(index_msg.htm) file described below : WM_ACTIVATE 0x0006 0x0000 WM_NULL WM_ACTIVATEAPP 0x001C 0x0001 WM_CREATE ... I would like to parse this file and to extract information like this : enum foo { eWM_ACTIVATE = 0x0006, eWM_ACTIVATEAPP = 0x0001, ... }; I am starting with this : fileIn = File.open("C:/WIKI_CE/index_msg.htm", "r") fileOut = File.new("C:/WIKI_CE/enumWmMsg.h", "w") begin while (line = fileIn.readline) line.chomp $stdout.print line end rescue EOFError fileIn.close fileOut.close end but now I am stuck. Should I use regex or how can I compare two string ?