Hi rsriram,
Here is one way to do it.
$str = 'a[bdy]dfjaPÑsdafÜ'; while ($str =~ /[^!-~\s]/g) { print "Non ASCII Characater:\t$&\n"; } Another way: while ($str =~ /[^[:print:]]/g) { print "Non Printable Characater:\t$&\n"; }
If you would have super searched, you would have got detecting non-ascii chars in a string, Getting rid of non-standard ASCII characters and more similar nodes.
Prasad
In reply to Re: Finding out non ASCII Characters in the text
by prasadbabu
in thread Finding out non ASCII Characters in the text
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |