jnicklas/capybara — pull request #921 by bencates (2012-12-31 20:42:03+00:00)
Title: Clean up ugly regex to use POSIX character class

`[[:space:]]` works like `\s` in regexes, except it is encoding aware. See http://www.ruby-doc.org/core-1.9.3/Regexp.html#label-Character+Classes

This avoids an issue I was seeing in 1.8 where the unicode characters were being misparsed and it was erroneously stripping several letters and most digits.