A
Ari Brown
Ok. I have a major pattern matching problem. In essence, right now
the word i am trying to match is "hello", WITH double quotes around it.
Why isn't this working? It always hits the else part of my case-when
loop.
write_file = open('albuminfo.txt', 'w')
lines.each do |line|
puts line
case line
when line =~ /^(.+)$/
write_file.puts('"#{$1}"')
write_file.close
print '.'
else
print '$'
end
end
It doesn't want to match!
Please don't let me drown,
---------------------------------------------------------------|
~Ari
"I don't suffer from insanity. I enjoy every minute of it" --1337est
man alive
the word i am trying to match is "hello", WITH double quotes around it.
Why isn't this working? It always hits the else part of my case-when
loop.
write_file = open('albuminfo.txt', 'w')
lines.each do |line|
puts line
case line
when line =~ /^(.+)$/
write_file.puts('"#{$1}"')
write_file.close
print '.'
else
print '$'
end
end
It doesn't want to match!
Please don't let me drown,
---------------------------------------------------------------|
~Ari
"I don't suffer from insanity. I enjoy every minute of it" --1337est
man alive