# Finding a specific string in a list

I have the following list:

l={"apple","orange","kiwi","APPLE","lemon"}


How can I make a command so the capitalised word would be returned? So in this case the output should be

{"APPLE"}


Surely one can do l[[4]] but this is not what I am looking for, I want to have a command to search on a long list and return the capital words. Also note that in my case the whole word is in capital letter not only the first letter. Also assume that I don't know what would be the capital word, I just know that I have a list and somewhere in it there is a capitalised letter word, I need to find those.

l = {"apple", "orange", "kiwi", "APPLE", "lemon", "Lemon", "leMon"};
Select[l, UpperCaseQ]


{"APPLE"}

• Ah, I need to recalibrate my gedanken Mathematica; I didn't know that plain UpperCaseQ[] will still work! :) Oct 12 '18 at 11:55
• @J.M. my gedanken mma would have tried #==ToUpperCase[#]&:)
– kglr
Oct 12 '18 at 12:00

Try

Select[l, StringMatchQ[__?UpperCaseQ]]