# NSRegularExpression class documentation

Generated at 2025-02-13 06:02:40 +0000
2011 Free Software Foundation, Inc.
Software documentation for the NSRegularExpression class
Foundation/NSRegularExpression.h
NSCoding
NSCopying
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.
escapedPatternForString:
string
Description forthcoming.
regularExpressionWithPattern:
aPattern
options:
opts
error:
e
Description forthcoming.
enumerateMatchesInString:
string
options:
options
range:
range
usingBlock:
block
Description forthcoming.
firstMatchInString:
string
options:
options
range:
range
Description forthcoming.
initWithPattern:
aPattern
options:
opts
error:
e
Description forthcoming.
matchesInString:
string
options:
options
range:
range
Description forthcoming.
numberOfCaptureGroups
Description forthcoming.
numberOfMatchesInString:
string
options:
options
range:
range
Description forthcoming.
options
Description forthcoming.
pattern
Description forthcoming.
rangeOfFirstMatchInString:
string
options:
options
range:
range
Description forthcoming.
replaceMatchesInString:
string
options:
options
range:
range
withTemplate:
templat
Description forthcoming.
replacementStringForResult:
result
inString:
string
offset:
offset
template:
templat
Description forthcoming.
stringByReplacingMatchesInString:
string
options:
options
range:
range
withTemplate:
templat
Description forthcoming.