Simpler solution not limited to non-ASCII chars:
s/(\p{Lu})|\p{Ll}/ defined($1) ? 'U' : 'L' /eg;
In reply to Re^2: change [A-Z] to U, [a-z] to L with one regex?
by ikegami
in thread change [A-Z] to U, [a-z] to L with one regex?
by Doctrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |