Archive for September, 2007

Wincent Colaitua on functional programming

Wincent Colaitua has written an interesting, worth reading blog post why functional programming could become more and more important in the future.

Note to myself: Have a deeper look at Haskell.

Technorati Tags:

Full Perl-Compatible Regular Expressions in Objective-C

A few months ago I wrote about a mechanism which allowed simple Pattern Matching with NSPredicate.
Although it is a good method to check if a string matches a Regular Expression it lacks a lot of features you normally expect while you’re doing something with Regular Expressions, such as capturing subpatterns or doing search and replace.

Philip Hazel (who also wrote my favourite SMTP server, Exim created a library called PCRE (Perl-Compatible Regular Expressions) a long time ago which implements the Regular Expression syntax used in Perl (sometimes I miss that time) for the C Programming Language.
While PCRE is great for doing Regular Expressions in C, it’s usage with Objective-C is some kind of cumbersome as NSString objects must be converted to plain C strings and back again.

But recently John Engelhart released an alpha version of his PCRE-based RegexKit framework, which provides a sweet object-oriented interface to Regular Expressions. It looks very mature and there is also a very good documentation available.

Thank you very much, John!

Technorati Tags: ,