From: 7stud -- Date: 2011-03-12T11:47:01+09:00 Subject: Re: universal symbol > my example is > while(line=f.gets(sep="class#{i} here will be any text ")) > ... > ... > i+=1 > end gets() does not let you specify wild cards like * (nor a regex), so the short answer is you can't do what you want. However, you could read the whole file into a variable, and then scan() the resulting string for chunks of text that match a regex, like: /class#\d .*? (?=class)/xms -- Posted via http://www.ruby-forum.com/.