Hi 3dbc,
replace the extended ascii character with a space
$string =~ tr/\x09\x0A\x0D\x20-\x7E/ /c;
See the documentation of tr/SEARCHLIST/REPLACEMENTLIST/cdsr under "Quote-Like Operators" in perlop.
Hope this helps,
-- Hauke D
In reply to Re^3: regex match unicode characters in ascii string
by haukex
in thread regex match unicode characters in ascii string
by 3dbc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |