Is this a sane Objective-C Block Implementation?
问题 I wanted a variation of NSRegularExpression's – stringByReplacingMatchesInString:options:range:withTemplate: method that takes a block instead of a template. The return value of the block would be used as the replacement value. This is more flexible than a template, as you can imagine. Sort of like using the /e modifier in Perl regular expressions. So I wrote a category to add the method. This is what I came up with: @implementation NSRegularExpression (Block) - (NSString *