I have the following function calls at several places in my class.
[myClass doOperationOne];
[myClass doOperationTwo];
[myClass doOperationThree];
I was trying to update my answer below for Xcode 8, but I couldn't do it. If you have the answer, please let me know.
Unless you were already a regular expression genius, this much easier to do in Xcode now. You don't need to use regular expressions at all (but you can if you still want to).
Replace these strings:
[myClass doOperationOne];
[myClass doOperationTwo];
[myClass doOperationThree];
with these strings
[myClass doOperationOneWithOptions:[Permissions isOptionsAvailable]];
[myClass doOperationTwoWithOptions:[Permissions isOptionsAvailable]];
[myClass doOperationThreeWithOptions:[Permissions isOptionsAvailable]];
The bolded numbers show why a plain Find and Replace won't work.
There are two ways you can do Find and Replace: Textual and Regular Expression
Click the magnifying glass
and "Edit Find Options..."
and choose one of them.
Enter [myClass doOperation in Find
Click the magnifying class and choose "Insert Pattern"
]; to FindWithOptions:[Permissions isOptionsAvailable]]; for the last part.Make sure that Regular Expressions are selected as described in Setup above.
Use (\[myClass doOperation)(.*)(\];) for the Regular Expression
Use $1$2WithOptions:[Permissions isOptionsAvailable]$3 for the Replacement String. The $1, $2, and $3 replace the parentheses in the regular expression.
A single Replace All will work now.
See this link for more help with regular expressions.