On Thursday 23 September 2004 03:54 am, Henrik Horneber wrote:
> Hi!
>
> What's the best way to test if a string only consists of whitespaces and
> newlines?

Unless you're being more specific:

  str.strip.length == 0

Also matching against something like

  /\A\s*\z/m

but I'm no Regexp expert by a long shot ;)

T.

-- 
( o _  елеще┴
 //    trans.
/ \    transami / runbox.com

I don't give a damn for a man that can only spell a word one way.
-Mark Twain