Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 528
Mytheral Avatar asked Feb 22 '23 16:02

Mytheral


1 Answers

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.

like image 195
Brian Walker Avatar answered Mar 06 '23 12:03

Brian Walker