Invisible character treated as word?
J. Landman Gay
jacque at hyperactivesw.com
Fri Jan 30 19:15:40 EST 2015
On 1/30/2015 6:50 AM, David Epstein wrote:
> But since it seems that fonts and systems will differ as to which
> characters are actually invisible, I will need to purge even harmless
> visible characters. So my current plan is to use this function:
>
> function scrubbedText txt
>
> -- For tab-delimited data, replace possibly invisible characters with a space; and then
>
> -- remove leading and trailing spaces from each cell
>
> 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 repeat
You could probably use "filter txt with regex pattern", if you can come
up with the right regular expression. One of our smart regex people
probably knows what that is.
If you do end up using the function above, I think you'll want to use
"and" instead of "or" in the "if" statement. As written it will match
all possible characters.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list