Skip to content

Instantly share code, notes, and snippets.

@myokoym
Created September 7, 2011 15:37
Show Gist options
  • Save myokoym/1200904 to your computer and use it in GitHub Desktop.
Save myokoym/1200904 to your computer and use it in GitHub Desktop.
とあるファイルからとある部分を取り出すスクリプト
#!ruby
mms_list = []
Dir.glob("*.asx") do |fn|
File.open(fn) {|f|
mms_list << f.read.scan(/(mms:.*?)"/)
}
end
File.open("mms_list.txt", "a") {|f|
mms_list.each {|m| f.puts(m) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment