From: nobu.nokada@... Date: 2002-12-06T12:46:39+09:00 Subject: Re: Regexp imxo - does 'x' work? Hi, At Fri, 6 Dec 2002 11:59:12 +0900, dblack@candle.superlink.net wrote: > > since ruby's comments continue till line's end, i guess there is no > > way to embed comments in a single line regex? or is there? > > All I can think of is: > > irb(main):003:0> /ab#{"This is a comment"*0}c/.match("abc") > # In 1.7, this is more efficient. /ab#{"This is a comment";""}c/.match("abc") Preceding literal is eliminated by successive literal, the regexp is compiled to a static literal. -- Nobu Nakada