Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'pp'
- require 'win32ole'
- path = 'D:/dev/access/tmp/*.sql'
- tablist =[]
- Dir.glob(path).map do |f|
- File.open(f,"r:CP863") do |i|
- tablist << i.read.scan(/\W[Rr]_\w{5,9}/)
- end
- end
- p tablist.flatten.map{ |e| e[1..-1] }.map(&:upcase).uniq
Add Comment
Please, Sign In to add comment