例如,我有一个字符串@"You've earned Commentator and 4 ##other$$ badges"。我想检索@"other"由##and分隔的子字符串$$。我做了一个这样的 NSRegularExpression:
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"##(.*)$$" options:NSRegularExpressionCaseInsensitive error:nil];
这完全忽略$$并返回以##. 我究竟做错了什么?谢谢。