Re: OgreKit, onigurama, and named groups
Re: OgreKit, onigurama, and named groups
- Subject: Re: OgreKit, onigurama, and named groups
- From: Roarke Lynch <email@hidden>
- Date: Mon, 3 Jan 2005 21:57:57 -0500
On Jan 3, 2005, at 2:36 AM, Satoshi Matsumoto wrote:
I have got an answer from Isao Sonobe, the author of OgreKit.
In order to use named groups, you need to assign OgreCaptureGroupOption as
below.
OGRegularExpression *regex = [OGRegularExpression
regularExpressionWithString:@"(?<document>.+)"
options:OgreCaptureGroupOption];
This spec is derived from Oniguruma.
Mr.Sonobe also thinks this spec is not intuitive and he is now consulting
with Mr.Kosako, the author of Oniguruma to remove the assignment of
OgreCaptureGroupOption.
Satoshi Matsumoto,
-----------------------------------------------------
What throws me off reading this and looking at OGRegularExpression.h there are the following lines in the comments concerning the options:
OgreDontCaptureGroupOption named group only captured. (/.../g)
OgreCaptureGroupOption named and no-named group captured. (/.../G)
Reading this I would assume that there is no way for named capture to be turned off. Similarly if named grouping is not enabled than why would the numberOfNamedGroups method return any value at all?
Roarke Lynch
-------------------------------
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden