Hi,

I just wanted to add that I've also been bitten by this issue. What I wanted was a way to squish consecutive whitespace characters in a 'dirty' input string, as well as to convert any newlines or tabs to spaces. Basically it's the equivalent of Ruby's gsub(/\s+/, ' ')

f/e:

NSString* lorem = @"This works\njust fine.";
[lorem stringByMatching:@"\\s+" replace:RKReplaceAll withReferenceString:@" "]

Gives me back "This works just fine."

However, if you use a much longer version of Lorem Ipsum (I won't clog up the comments here with that text) what I get back is the *end* of the string (albeit with correct substitutions made).

Thanks,
Trev