If you wanted to use Unicode's definition of case insensitivity — they are the experts in this area — you should convert the strings to fold case (not lower case or upper case) and then compare them. The simplest way of doing that is:
$s1 =~ /^\Q$s2\E\z/i
Like the lc and uc methods, this assumes the string has previously been normalised. All together,
use Unicode::Normalize qw( NFC ); $s1 = NFC($s1); $s2 = NFC($s2); $s1 =~ /^\Q$s2\E\z/i
In reply to Re: how to nullify case sensitivity
by ikegami
in thread how to nullify case sensitivity
by iphone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |