Hi:
I’m using Ruby 1.6.7 MSWin32 on Win98 and I’m having a little problem
with gsub or could it be a known or unknown bug in Ruby?
I’m downloading a webpage and trying to simplify it for extracting
data with gsub.
Example website schema:
....info A1 | info B1 | .... ......
info Ax | info Bx | ....
I’m using this following code to remove unuseful information from the It’s quite effective but at the expected end of the corrected string, Thanks in advance,
string with the webpage content:
cont.gsub!(/(\n|\r|\t| )/, “”)
cont.gsub!(/<TABLE.?>/i, “”)
Time is now: ......
Message Board ...
cont.gsub!(/<IMG.?>/i, “”)
cont.gsub!(/<TR.?>/i, “”)
cont.gsub!(/<TD.?>/i, “”)
it would be the first tag “”, the rest of the original string
has survivied.
Time is now: ......
Message Board ...
Message Board ...
href=...
......
info A1
info B1 ....
info Ax
info Bx ....
info Ax
info Bx ....
Nikolaus Hammerschmit