------art_39060_32793580.1174313664249
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Non-capturing grouping is exactly what it sounds like, a group that doesn't
capture whatever it matches, but still consumes.   So..

#non capturing group
irb(main):009:0> "1234" /(?:1234)/
0
irb(main):010:0> $1
nil

#capturing group
irb(main):011:0> "1234" /(1234)/
0
irb(main):012:0> $1
"1234"

Lookahead and lookbehind peek ahead or behind without consuming what they
match.

MBL
On 3/18/07, 7stud 7stud < dolgun / excite.com> wrote:
>
> come wrote:
> > Hi,
> >
> > The syntax (?:re) isn't a lookbehind. It is a grouping form like (re)
> > but without capture.
>
> I don't understand the distinction.
>
> --
> Posted via http://www.ruby-forum.com/.
>
>

------art_39060_32793580.1174313664249--