I have NSLogs in code, so many time. A easy solution is that I replace with
NSLog(@ with //NSLog(@
In Xcode just search and replace from the Project Navigator. You can select "Starting with", "Contains", "Regular Expression", etc.
Using Regular Expression
^[\s\W]+NSLog.*$ should work well for lines that might have a tab or space before the
NSLog but won't catch lines with other text that may be in front of it. (notice in the second screen shot
NSLog was detected at the end of the line, while the first didn't).
Another example might be if you want to keep commented
NSLog lines and remove the others:
NSLog on line 3 and
NSLog(@"%@",removed); on line 7.
// NSLog /* NSLog */ NSLog NSString *NSLog = @"not nslog" NSLog(@"%@",removed);