Guest User

Untitled

a guest
Oct 16th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. require 'pp'
  2. require 'win32ole'
  3. path = 'D:/dev/access/tmp/*.sql'
  4.  
  5. tablist =[]
  6. Dir.glob(path).map do |f|
  7. File.open(f,"r:CP863") do |i|
  8. tablist << i.read.scan(/\W[Rr]_\w{5,9}/)
  9. end
  10. end
  11. p tablist.flatten.map{ |e| e[1..-1] }.map(&:upcase).uniq
Add Comment
Please, Sign In to add comment