??????????????????????????????????????????谢??????????????????????????????????????????????些??????????????????斜????????????????“???[??笑]??[????]”???????????????????????????????????????????????????????娼�?????????????????????
??????????????IOS?????械???????.plist?? ???????????????TextView?????????????谩?
??????????????路????????????????????????????????range?? ?????range??????????械?????????????[????]?? ???[????] ??????.plist??item?渭?chs????????????????????????????????????????????????????????????婊�???伞???????????????????????????????
????1.????????????????????????????椋�?????????????????????????????.plist????????????????????????写娲�??????????????????root????????椋�?????械?item????????????写??????????????????????????????????????????????????????????????

????2.??未?.plist????谢??????????????bundle???????????路????????????路?????????椋�?????写娲�????????????械???????????锟�?
????//????plist????械?????
????NSBundle *bundle = [NSBundle mainBundle];
????//????????路??
????NSString *path = [bundle pathForResource:@"emoticons" ofType:@"plist"];
????//???plist?械?????
????NSArray *face = [[NSArray alloc] initWithContentsOfFile:path];
????3.??????????????????????????????魏伪??椋�?????婊�??
????//??????????????????????路???????????????
????NSString *str = @"??[围??]??[????]??[????]??[????]??[????]??[??]??[?]??[???]??[?][123456]";
????4.???????str???????????????????????????????????????????TextView???????????????????????????锟�?
????//????????????????????
????NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] initWithString:str];
????5.?????????????????????????????械??围???????????????????[/*]??????[123567]????????????????????????????
????//?????????婊�????????围
????//???????
????NSString * pattern = @"\[[a-zA-Z0-9\u4e00-\u9fa5]+\]";
????NSError *error = nil;
????NSRegularExpression * re = [NSRegularExpression regularExpressionWithPattern:pattern options:NSRegularExpressionCaseInsensitive error:&error];
????if (!re) {
????NSLog(@"%@"?? [error localizedDescription]);
????}
????//????????????????????
????NSArray *resultArray = [re matchesInString:str options:0 range:NSMakeRange(0?? str.length)];