From: Guillaume Theoret Date: 2007-05-16T09:48:35+09:00 Subject: Re: how to determine if a string is printable? if(string =~ /.*[\a\b\e\f\n\r\t\v].*/) puts "Invalid string" else puts string + " is ok" end On 5/15/07, Mike Steiner wrote: > Is there an easy way to test if a string is printable (doesn't contain > control characters)? Something easier than listing out all the letters, > numbers, and punctuation and checking each character. > > Mike Steiner >