From: automat_svet Date: 2005-04-14T17:29:40+09:00 Subject: Re: pattern matching question Hey thank you very much for all your replies! it seems to me that '^[' reprsent some control charcter (like the escape charcter suggested by Guy) as if I do: s = 'bla bla bla ^[4 297,12^[2 ' puts s.scan(/(?:\d+,\d+)\^\[2/) It works perfectly but if I do this: File.open('myinvoice.txt' , "r") do |file| file.each_line {|line| x = line.scan(/(?:\d+,\d+)\^\[2/) puts x} end I can't get anything.. Thanks again for your help automat_svet