From: Brian Candler Date: 2009-11-20T00:10:31+09:00 Subject: Re: How to strip ruby comments in a ruby line of code? Alexandre Mutel wrote: > Woop, i was to fast. In fact, i need an eval on the whole file, because > my dsl language allow ruby code to be used (and so definition of > methods... etc.) Then it sounds like you just need to separate the blocks of code appropriately. Do you want each line which begins with \w: (a labelled line) to be treated specially? Then the rest of the code between the labelled lines can be treated as a single string. Proof-of-concept: src = <