I want to be able to check if a word is already all uppercase. And it might also include numbers.
Example:
GO234 => yes
Go234 => no
a = "Go234"
a.match(/\p{Lower}/) # => #
b = "GO234"
b.match(/\p{Lower}/) # => nil
c = "123"
c.match(/\p{Lower}/) # => nil
d = "µ"
d.match(/\p{Lower}/) # => #
So when the match result is nil, it is in uppercase already, else something is in lowercase.
Thank you @mu is too short mentioned that we should use /\p{Lower}/ instead to match non-English lower case letters.