Using the Mac or iPhone's Built in Regex Routines
In which a convenient method of using POSIX regular expressions from Objective-C is presented.
It's a common complaint that the Mac and iPhone platforms don't have native support for regular expressions, but that's not entirely true. If you drop down to the UNIX core, there's an implementation of the old (and only partially busted) POSIX regular expression interfaces. Here, I'll show a simple Objective-C wrapper class for them that lets you use them conveniently in Mac or iPhone apps.
Before I start, some preemptive remarks: There's a lot wrong with POSIX regexes to modern eyes. Firstly, and most glaringly, the ...
Syntax of the Future Past
There is a fair amount of complaining on The Internets at the moment about Objective-C and Apple’s choice to use it for the iPhone. Many newcomers to the ‘platform’ (if I can apply a singular name to Mac and iPhone development) are finding the language - and the Cocoa frameworks based on it - very confusing. Just how can a language with sooooo many square brackets! be at-all easy to use, after all?
This provoked some deja-vu. Hadn’t, my vague memories asked me, this complaining been done before? I seemed to remember some talk of an “alternate syntax” for Objective-C ...