Xcode 4 - Regular Expression Finder

TL DR I want to use Xcodes finder with regular expressions to update legacy function calls.

Example 'numFrames: ??? endFrame: @ "step1 * _0 ??? text =" "', where the question marks are replaced with a 1-3-digit number, and * is the letter and simply delete it all.

Long version At first I know that I need to update my memory on regular expressions, but I feel like I am banging my head on the wall on this ...

I want to use finder to update my function calls. I played ~ 400 image sequences in my application, and it was impractical to keep updating individual sequence lengths when they were updated. Now, to decide that I have an application that independently calculates the length, but I still have outdated length declarations. I could go through one at a time and delete them, but I know that Finder can use regular expressions ...

What I want to delete is' numFrames: ??? endFrame: @ "step1 * _0 ??? text =" "', where the question marks are replaced by a 1-3-digit number, and * - by a letter.

If you could give me a good hcode and a regular expression guide (teach a person how to fish ...) or just tell me how to do this, it would be great.

+4
source share
1 answer

In the search control, click the magnifying glass and select "Show search options." Change the Style parameter from "Textual" to "Regular Expression". Enter your regular expression in the search field.

+8
source

All Articles