Mytheral
Mytheral

Reputation: 3959

Xcode 4 - Finder with Regular Expressions

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

Example 'numFrames:??? endFrame:@"step1*_0??? text=" "' where the question marks are replaced by a 1-3 digit number and * is a letter and just delete all of that.

Long Version First off I know I need to refresh my memory on regular expressions but I feel like I'm banging my head into a wall on this...

I want to use finder to update my calls to a function. I was playing ~400 image sequences in my application and it was impractical to keep updating the individual sequence lengths when they would get updated. Now to solve that I have my application figuring out the length on its own, but I still have outdated length declarations. I could go through one at a time and delete them out but I know Finder can use regular expressions...

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

If you could point me to a good xcode and regular expression guide (Teach a man to fish...) or just tell me how to do this, either would be great.

Upvotes: 4

Views: 984

Answers (1)

Brian Walker
Brian Walker

Reputation: 8908

In the find control click the magnifying glass and choose "Show Find Options". Change the Style option from "Textual" to "Regular Expression". Type your regular expression into the search box.

Upvotes: 8

Related Questions