-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSCUtils.m
More file actions
23 lines (19 loc) · 763 Bytes
/
SCUtils.m
File metadata and controls
23 lines (19 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//
// SCUtils.m
//
//
// Created by Charles Stigler on 08/05/2017.
//
//
#import "SCUtils.h"
@implementation SCUtils
- (NSString*)stringWithoutRegexSpecialChars:(NSString*)input {
return [input stringByReplacingOccurrencesOfString: @"[\\\\\\^\\$\\.\\|\\?\\*\\+\\(\\)\\[\\{]"
withString: @"\\\\$0"
options: NSRegularExpressionSearch
range: (NSRange){0, [input length]}];
// return [input stringByR (of: "[\\\\\\^\\$\\.\\|\\?\\*\\+\\(\\)\\[\\{]",
// with: "\\\\$0",
// options: .regularExpression)
}
@end