#import <objc/objc.h>
#import <objc/Object.h>
#import <Foundation/Foundation.h>
@implementation TestObj
int main( )
{
NSString * phraseLabelWithBrackets = @"(test text) 1 2 3 text test" ;
NSError * error = NULL;
NSRegularExpression * regexp = [ NSRegularExpression regularExpressionWithPattern: @"\\ ([^()]+\\ )" options: NSRegularExpressionCaseInsensitive error:& error] ;
NSString * phraseLabelWithoutBrackets = [ regexp stringByReplacingMatchesInString: phraseLabelWithBrackets options: 0 range: NSMakeRange( 0 , [ phraseLabelWithBrackets length] ) withTemplate: @"" ] ;
NSLog( phraseLabelWithoutBrackets) ;
return 0 ;
}
@end
I2ltcG9ydCA8b2JqYy9vYmpjLmg+CiNpbXBvcnQgPG9iamMvT2JqZWN0Lmg+CiNpbXBvcnQgPEZvdW5kYXRpb24vRm91bmRhdGlvbi5oPgoKQGltcGxlbWVudGF0aW9uIFRlc3RPYmoKaW50IG1haW4oKQp7CglOU1N0cmluZyAqcGhyYXNlTGFiZWxXaXRoQnJhY2tldHMgPSBAIih0ZXN0IHRleHQpIDEgMiAzIHRleHQgdGVzdCI7CglOU0Vycm9yICplcnJvciA9IE5VTEw7CglOU1JlZ3VsYXJFeHByZXNzaW9uICpyZWdleHAgPSBbTlNSZWd1bGFyRXhwcmVzc2lvbiByZWd1bGFyRXhwcmVzc2lvbldpdGhQYXR0ZXJuOkAiXFwoW14oKV0rXFwpIiBvcHRpb25zOk5TUmVndWxhckV4cHJlc3Npb25DYXNlSW5zZW5zaXRpdmUgZXJyb3I6JmVycm9yXTsKCU5TU3RyaW5nICpwaHJhc2VMYWJlbFdpdGhvdXRCcmFja2V0cyA9IFtyZWdleHAgc3RyaW5nQnlSZXBsYWNpbmdNYXRjaGVzSW5TdHJpbmc6cGhyYXNlTGFiZWxXaXRoQnJhY2tldHMgb3B0aW9uczowIHJhbmdlOk5TTWFrZVJhbmdlKDAsIFtwaHJhc2VMYWJlbFdpdGhCcmFja2V0cyBsZW5ndGhdKSB3aXRoVGVtcGxhdGU6QCIiXTsKCU5TTG9nKHBocmFzZUxhYmVsV2l0aG91dEJyYWNrZXRzKTsKCXJldHVybiAwOwp9CkBlbmQ=