From: Tim Bates Date: 2003-03-16T19:33:59+09:00 Subject: Can't think I'm too tired to think this out for myself, and I can't find it in the pickaxe, so I'm going to be lazy and bug the list; no doubt someone will see the solution right away. I want to do this: mystring.split("\n").delete_if{ |s| s =~ /^\s*$/ }.join("\n") using gsub ('cause it'd be nicer). So what I'm doing is removing those lines that consist of only whitespace. I tried this: mystring.gsub(/^\s*$/, "") This removes the whitespace, but not the newline, like the above one does. So really, the question is how do I get the regexp to match the newline? Tim Bates -- tim@bates.id.au