From: James Edward Gray II Date: 2006-01-15T07:21:29+09:00 Subject: Re: Newbie regex question about \w On Jan 14, 2006, at 4:14 PM, Jeff Cohen wrote: > I'm trying to parse ruby files to find all the class definitions in > the > file. For each line in the file, I thought I could use the > following to > pull out the class name: > > \bclass\b(\w+)\b > > so then $1 would give me the class name. You're close, you just forgot to allow for some space between class and the name. A boundary is a zero-width assertion, so it's not enough: \bclass\s+(\w+)\b Hope that helps. James Edward Gray II