Henrik Horneber <ryco / gmx.net> writes: > Hi! > > What's the best way to test if a string only consists of whitespaces > and newlines? class String def is_whitespace_only? self !~ /[\s\n]/m end end