On Fri, Jul 06, 2007 at 09:50:13AM +0900, Ari Brown wrote:
> 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 =~ /^(.+)$/

when /^(.+)$/

>     write_file.puts('"#{$1}"')
>     write_file.close
>     print '.'
>   else
>     print '$'
>   end
> end
> 
> It doesn't want to match!

-- 
Jos Backus
jos at catnook.com