OgreKit, onigurama, and named groups
OgreKit, onigurama, and named groups
- Subject: OgreKit, onigurama, and named groups
- From: Roarke Lynch <email@hidden>
- Date: Wed, 29 Dec 2004 00:52:41 -0500
Has anyone had any success getting named groups from OgreKit? I have
looked over the syntax documation for onigurama, and it plainly says
that named groups are included in the syntax but i simple cannot get
them to work. I cannot read the docs for OgreKit as they are in
Japanese but I understand it to be mainly a Obj-C wrapper for the C
onigurama. What really confuses me is that it can recognize the named
groups within the expression but doesn't seem to apply this name to
matches.
For instance if I do the following:
OGRegularExpression *regex = [OGRegularExpression
regularExpressionWithString:@"(?<document>.+)"];
NSLog(@"has %d named groups: %@", [regex numberOfNames], [regex
names]);
I get:
"has 1 named groups: (null)"
Whats up with that? If I enumerate the matches coming out from any
string I get one match (as expected), but If i query for the string
named "document" I get a nil. I know that some of the syntaxes that
OgreKit allow do not include named groups, but the default does unless
I am reading incorrectly. Any ideas? I really wish that there was a
robust Obj-C RegEx framework, or at least one with docs in english as i
am lowly mono-lingual american.
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