From: Ryan Davis Date: 2009-08-31T16:44:17+09:00 Subject: Re: Regex: Get Class Name 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.