Last active
December 12, 2015 01:39
-
-
Save johnhaitas/4693189 to your computer and use it in GitHub Desktop.
convert NSDictionary/NSMutableDictionary to literal syntax Xcode Find/Replace regex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[aDictionary objectForKey:@"Key"] -> aDictionary[@"Key"] | |
========================================================= | |
Find | |
\[(\w+) *objectForKey: *(@"\w+") *\] | |
Replace | |
\1\[\2\] | |
[aDictionary setObject:object forKey:@"Key"] -> aDictionary[@"Key"] = object | |
============================================================================= | |
Find: | |
\[(\w+) *setObject: *(\w+) *forKey: *(@"\w+") *\] | |
Replace: | |
\1\[\3\] = \2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment