Skip to content

Instantly share code, notes, and snippets.

@aurelian
Created July 25, 2008 14:30
Show Gist options
  • Save aurelian/2454 to your computer and use it in GitHub Desktop.
Save aurelian/2454 to your computer and use it in GitHub Desktop.
buff = ""
File.open('1.txt', 'r').each_line do |line|
if line =~ /^----- /i && buff != ""
puts "--> " + buff
puts "[ " + tags.join(", ") + " ]"
while rline= gets do
tag= rline.chomp!
print "--> " + tag
break if tags.include?(tag)
print " not okay.\n"
end
print "\n\n\n\n"
buff = ""
else
buff << line
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment