aidy wrote:
>    t = $ie.table(:index, '2').to_a.flatten
>    t.each {|a|
>              p "table #{a}"
>              p "line #{line}"
>              if /line/ =~ a; p 'match' else; p 'not match'; end
>         }
> 

try
  /#{line}/ =~ a

cheers