Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kristopherjohnson/5a0267b253bec73d43e4 to your computer and use it in GitHub Desktop.
Save kristopherjohnson/5a0267b253bec73d43e4 to your computer and use it in GitHub Desktop.
Regular expression that matches the file header comment that Xcode automatically generates
//
// .*
// .*
//
// Created by .*
// Copyright .*
//
@kristopherjohnson
Copy link
Author

To replace all auto-generated Xcode comment headers with a different comment header, do the following:

  1. Select and copy the above snippet
  2. In Xcode, choose Find > Find and Replace In Project...
  3. Set the option to Regular Expression if it is not already set
  4. Paste the expression into the top Replace box
  5. Type or paste the replacement text into the With box
  6. Hit Return to preview the changes, and click the Replace All button to confirm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment