Regexes: Now you have 2^N problems.
devblog.getinvisiblehand.com
devblog.getinvisiblehand.com
"Complexity Attacks" against web services aren't unknown, where you can bring a server to its knees with a well-chosen string. Search engines in blogs, wikis, and the like are a good target, since they are running user's regular expressions. But you should make sure your own regexes don't backtrack much either.
Or, use a linear matching engine, like re2. For more information about the complexity of matching a regex, Russ Cox's page is a classic: http://swtch.com/~rsc/regexp/regexp1.html