Skip to content

Instantly share code, notes, and snippets.

@kristianfreeman
Created November 30, 2012 18:46
Show Gist options
  • Save kristianfreeman/4177675 to your computer and use it in GitHub Desktop.
Save kristianfreeman/4177675 to your computer and use it in GitHub Desktop.
square = File.new "foursquare.kml"
date_array = Array.new
square.readlines.each do |line|
date = line.match(/<updated>\w*, \S* \w* \S* \S* \+0000<\/updated>/)
date_array << date
end
puts date_array
File.open('dates.txt', 'w') {|f| f.write(date_array) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment