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.