I tried a simple script with
arr = data.scan /<td>([^<]+)/
and the arr is filled with the data within the <td>
and </td>
when it is run using
ruby try.rb
but when it is run using
ruby script/runner app/try.rb
so that it is run just like inside of script/console
, then now there is an extra </td>
attached to the matched data... Why would that be? It is Ruby 1.8.7 with Rails 2.3.8. Would it be due to unicode in the app environment or something else?