Friday, December 14, 2007

Overcoming Language Barriers

Editor's Note: Overcoming Language Barriers with Elegant Design

Find the number of words (we'll loosely define "word" to be a block of characters separated by a space) in this article with more than eight characters. Which of these is more expressive?

article.Split(new char[]{' '}).Where(w => w.Length > 8);

or

[\S\(\)]{9,}

0 comments: