Add as many Xcode Source Editor Plugins as you need only by regular expressions.
With RegEx Marker, you can easily automate code editing by the power of regular expressions in just three steps:
1- write regular expression fit the code you want to edit.
2- Choose an operator (Add|Replace|Remove) to tell Xcode what to do with selected Regular expression matches.
3- write snippet code you want the operator to use.
To install RegEx Marker in Xcode 10 (or Xcode 9) on macOS Mojave (or High Sierra):
• Quit Xcode;
• Launch “RegEx Marker” from your Applications folder and add new item or edit one;
• Enable RegEx Marker extension in System Preferences -> Extensions -> Xcode Source Editor;
• Restart Xcode;
• Use Editor -> RegEx Marker menu to edit selection or whole file.