[[ と ]] と {{ と }} の出現を含む文字列があります。次のコードで [ ] { } が 1 回出現した場合にそのまま維持される正規表現はどれですか?
NSString* initialString = @"[[hi]] {{this}} {is} [a] {{string}}";
NSString* regex = @""; // Which regex would work
NSString* finalString = [match stringByReplacingOccurrencesOfRegex:regex withString:@""];
期待される出力:
こんにちは、これは {is} [a] 文字列です