i want to replace the string aaaa{\"type\":\"video\",\"title\":\"a\",manyothershere\"}ssss to aaaa[video]ssss
this means the string {"type":"video","title":"a",balabala"} to [video]
i use RegexKitLite,i tried the code below ,but it doesn't work.
NSString *videoRegexString = @"{\"type\":\"video\",.+\"}";
NSString *replacedStr = [@"aaaa{\"type\":\"video\",\"title\":\"sdf\",manyothershere\"}ssss" stringByReplacingOccurrencesOfRegex:videoRegexString withString:@"[video]"];
i suppose the replacedStr is "aaaa[video]ssss" but it's nil am i wrong?