I am trying to filter my attributedString this way, using this code. However, I want the rangeOfCharacterFromSet:
to include all of its original values EXCEPT for the "@" sign. How would I do this?
NSRange rangeSpace = [filteredText rangeOfCharacterFromSet:[NSCharacterSet punctuationCharacterSet] options:NSCaseInsensitiveSearch range:NSMakeRange(range.location, filteredText.length - range.location)];
NSMutableCharacterSet *punctuationSet = [NSMutableCharacterSet punctuationCharacterSet];
[punctuationSet removeCharactersInString:@"@"];
NSRange searchRange = NSMakeRange(range.location, filteredText.length - range.location)
NSRange rangeSpace = [filteredText rangeOfCharacterFromSet:punctuationSet
options:NSCaseInsensitiveSearch
range:searchRange];