Created
July 25, 2008 14:30
-
-
Save aurelian/2454 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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