J
J Taylor
Hi!
I've seen various examples of stripping non-printing (and non-ascii)
chars from a string with something like this:
$string =~ s/[\000-\037]/ /g;
I've chosen to strip all but the printable ascii chars (using hex):
$string =~ s/[^\x20-\x7f]/ /g;
This *seems* to work better for my purposes, I'm wondering though if are
gotchas I'm missing.
Thanks.
I've seen various examples of stripping non-printing (and non-ascii)
chars from a string with something like this:
$string =~ s/[\000-\037]/ /g;
I've chosen to strip all but the printable ascii chars (using hex):
$string =~ s/[^\x20-\x7f]/ /g;
This *seems* to work better for my purposes, I'm wondering though if are
gotchas I'm missing.
Thanks.