--_edf6cad0-7add-4a12-8fb8-f693eae1ce53_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > > > if I do this: > > > > > > f=open('filename.dat','r') > > > str=f.read > > > > > > and then: > > > > > > str.each_line do |line| > > > /ruby/.match(line) > > > > > > ruby prints out variable line and say its a RegexpError > > > 'empty range in character class' as if it interprets line as a Regexp > > > What am I doing wrong? There are a lot of strange characters in variable line, > > > maybe that is the issue? I found out what I was doing the wrong way.. I'm reading the search pattern with readline and I wrote it -->/ruby/ That didnt make it a Regexp. Now I found that if I write it -->ruby and then pattern=Regexp.new(input_str) it works.. /Mix -_edf6cad0-7add-4a12-8fb8-f693eae1ce53_--