From: L7 Date: 2006-09-14T01:35:45+09:00 Subject: Re: Regular expression question. Jeff Cohen wrote: > > My eyes glaze over with these kinds of expressions, but this might help: > > http://www.regularexpressions.info/examplesprogrammer.html > > Scroll down the section on "Comments". They seem to have a simpler > solution, I think the trick is to be able to use . as matching newlines. > I dont think it applies to this directly. I didnt explicitly mention, but the processing is happening on a line-by-line basis. In order to remove all commenting in the above manner I would first have to read the file as a string, strip, split on newline then parse code. > And you can turn on newline matching in Ruby by putting an "m" after the > expression: > > /my_pattern_here/m > > Hope this helps...? > > Jeff > softiesonrails.com > > -- > Posted via http://www.ruby-forum.com/.