From: Mikael Brockman Date: 2004-09-23T18:53:19+09:00 Subject: Re: whitespace string only Henrik Horneber 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