> function scrubbedText txt > repeat for each char k in txt > if charToNum(k) > 31 or charToNum(k) < 127 then put k after hold > else put space after hold > end repea > set itemDelimiter to tab > repeat for each line k in hold > repeat for each item i in k > put word 1 to -1 of i & tab after k2 > end repeat > put return into char -1 of k2 > put k2 after hold > put empty into k2 > end repeat > return hold2 > end scrubbedText > > If anyone sees a way to do this without stepping through each character, or without excluding non-standard visible characters, suggestions are welcome.
Hi David, Umm, as invisible char has no-standard meaning, I'm not completely sure if this one will fit your needs: put replacetext( txt, "[^[:print:]\n\t]", empty) into newTxt HTH, Thierry PS: if looking at regular expressions it's like a goat staring at a new fence, please, accept my apologies and try to enjoy your week-end. ------------------------------------------------ Thierry Douez - http://sunny-tdz.com Maker of sunnYperl - sunnYmidi - sunnYmage _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode