From: Mark Probert Date: 2002-10-03T05:29:08+09:00 Subject: Regexp: Stripping out all except ASCII? Hi. A simple one, again. How do I strip out all chars except valid ASCII from a file? while line = gets() line.sub(/[^\w]/, " ") puts line end leaves stuff, such as ESC sequences. Any ideas? Is there a one-liner for this? Regards, -mark.