Hi, If i understood your question correctly, here is my coding:
my $ohm = '24Ù'; print "Before substract : $ohm"; if ($ohm =~ /[^!-~\s]/g)#This helps to find the non ascii character { $unit=$&; $ohm=~s/$unit//e; } print "\nUnit : $unit\nAfter substract : $ohm"; # This will return a +? in my CMD be aware that you cannot see the Ohm character
I think it helps you.
Regards,
Velusamy R.
In reply to Re: Substr cannot extract last special character
by Samy_rio
in thread Substr cannot extract last special character
by juo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |