s$ = chr$(31) + "abc" + chr$(13) + "def" + chr$(11) + "ghi" + chr$(10) print strip$(s$) ' ----------------------------------------- ' strip junk ' ----------------------------------------- FUNCTION strip$(str$) for i = 1 to len(str$) a$ = MID$(str$,i,1) a = ASC(a$) if a > 31 then if a < 123 then if a$ <> "'" then if a$ <> """" then strip$ = strip$ + a$ end if end if end if end if next i END FUNCTION