Objective-C Method Signature RegEx
Published by Steve Streza April 13th, 2007 in CocoaIf you don’t understand the title of this post, don’t bother reading any further. If you do, here’s a nice regular expression that will, given an Obj-C source file (.h or .m), give you all of the method signatures. It should work in every case that I can think of, but if you’re doing anything involving weird types or preprocessor macros it should work.
(\-|\+)\s*\([\w\s]+(\s*\*)?\)\w+(:\([\w\s]+(\s*\*)?\)\w+\s?)?(\w+:\([\w\s]+(\s*\*)?\)\w+\s?)*
7 Comments to “Objective-C Method Signature RegEx”
- 1 Trackback on Sep 28th, 2007 at 11:31 am
- 2 Trackback on Feb 5th, 2008 at 4:05 pm
- 3 Trackback on Feb 10th, 2008 at 3:57 pm
- 4 Trackback on Mar 27th, 2008 at 6:37 am
- 5 Trackback on Aug 16th, 2008 at 5:02 am
Wanted to compliment on your site, it looks really good .
Hank
hi all.