From: Ahmet Kilic Date: 2009-08-31T17:16:09+09:00 Subject: Re: Regex: Get Class Name Ryan Davis wrote: > On Aug 31, 2009, at 00:37 , Robert Klemme wrote: > >> >> I'd probably do >> >> /::CLASS_NAME\s*=\s*"([^"]+)"/ > > I'd generally agree with that, but as I told the OP in IRC, in this > case I think it is better to think outside the box: > > name = src[/(\w+)::CLASS_NAME\s*=/, 1] > > Since that is the real name, it makes more sense to me. thank you very much. -- Posted via http://www.ruby-forum.com/.