Methods



count


- (int)count; 

The number of capturing subpatterns, including the pattern itself.


group


- (NSString *)group; 

Returns the part of the target string that matched the pattern.


groupAtIndex:


- (NSString *)groupAtIndex:(int)idx; 

Returns the part of the target string that matched the subpattern at the given index or nil if it wasn't matched. The subpatterns are indexed in order of their opening parentheses, 0 is the entire pattern, 1 is the first capturing subpattern, and so on.


groupNamed:


- (NSString *)groupNamed:(NSString *)name; 

Returns the part of the target string that matched the subpattern of the given name or nil if it wasn't matched.


range


- (NSRange)range; 

Returns the range of the target string that matched the pattern.


rangeAtIndex:


- (NSRange)rangeAtIndex:(int)idx; 

Returns the range of the target string that matched the subpattern at the given index or {NSNotFound, 0} if it wasn't matched. The subpatterns are indexed in order of their opening parentheses, 0 is the entire pattern, 1 is the first capturing subpattern, and so on.


rangeNamed:


- (NSRange)rangeNamed:(NSString *)name; 

Returns the range of the target string that matched the subpattern of the given name or {NSNotFound, 0} if it wasn't matched.


string


- (NSString *)string; 

Returns the target string.

(Last Updated 9/12/2003)