Up

NSRegularExpression class documentation

Authors

Generated by Gregory John Casamento,,,

Date: Generated at 2023-12-20 19:35:39 -0500

Copyright: (C) 2010 Free Software Foundation, Inc.

Software documentation for the NSRegularExpression class

NSRegularExpression : NSObject

Declared in:
Foundation/NSRegularExpression.h
Conforms to:
NSCoding
NSCopying
Availability: MacOS-X 10.0.0

NSRegularExpression is used to inspect and manipulate strings using regular expressions. The interface is thread safe: The same NSRegularExpression object may be used to concurrently perform matching on multiple threads. To guard against regular expressions with extremely poor performance, the underlying matcher will abort after a certain number of steps. This is controlled using the GSRegularExpressionWorkLimit user default. The value of this default key represents the number of steps executed by the match engine, so it is only indirectly correlated with the time taken to execute the pattern, but it usually in the order of milliseconds. The preset 1500, setting value to 0 disables the work limit.
Method summary

regularExpressionWithPattern: options: error: 

+ (NSRegularExpression*) regularExpressionWithPattern: (NSString*)aPattern options: (NSRegularExpressionOptions)opts error: (NSError**)e;
Availability: MacOS-X 10.0.0

Description forthcoming.

enumerateMatchesInString: options: range: usingBlock: 

- (void) enumerateMatchesInString: (NSString*)string options: (NSMatchingOptions)options range: (NSRange)range usingBlock: (GSRegexBlock)block;
Availability: MacOS-X 10.0.0

Description forthcoming.

firstMatchInString: options: range: 

- (NSTextCheckingResult*) firstMatchInString: (NSString*)string options: (NSMatchingOptions)options range: (NSRange)range;
Availability: MacOS-X 10.0.0

Description forthcoming.

initWithPattern: options: error: 

- (id) initWithPattern: (NSString*)aPattern options: (NSRegularExpressionOptions)opts error: (NSError**)e;
Availability: MacOS-X 10.0.0

Description forthcoming.

matchesInString: options: range: 

- (NSArray*) matchesInString: (NSString*)string options: (NSMatchingOptions)options range: (NSRange)range;
Availability: MacOS-X 10.0.0

Description forthcoming.

numberOfCaptureGroups 

- (NSUInteger) numberOfCaptureGroups;
Availability: MacOS-X 10.0.0

Description forthcoming.

numberOfMatchesInString: options: range: 

- (NSUInteger) numberOfMatchesInString: (NSString*)string options: (NSMatchingOptions)options range: (NSRange)range;
Availability: MacOS-X 10.0.0

Description forthcoming.

options 

- (NSRegularExpressionOptions) options;
Availability: MacOS-X 10.0.0

Description forthcoming.

pattern 

- (NSString*) pattern;
Availability: MacOS-X 10.0.0

Description forthcoming.

rangeOfFirstMatchInString: options: range: 

- (NSRange) rangeOfFirstMatchInString: (NSString*)string options: (NSMatchingOptions)options range: (NSRange)range;
Availability: MacOS-X 10.0.0

Description forthcoming.

replaceMatchesInString: options: range: withTemplate: 

- (NSUInteger) replaceMatchesInString: (NSMutableString*)string options: (NSMatchingOptions)options range: (NSRange)range withTemplate: (NSString*)templat;
Availability: MacOS-X 10.0.0

Description forthcoming.

replacementStringForResult: inString: offset: template: 

- (NSString*) replacementStringForResult: (NSTextCheckingResult*)result inString: (NSString*)string offset: (NSInteger)offset template: (NSString*)templat;
Availability: MacOS-X 10.0.0

Description forthcoming.

stringByReplacingMatchesInString: options: range: withTemplate: 

- (NSString*) stringByReplacingMatchesInString: (NSString*)string options: (NSMatchingOptions)options range: (NSRange)range withTemplate: (NSString*)templat;
Availability: MacOS-X 10.0.0

Description forthcoming.


Up