Using QGIS 2.14 and see there is now rule based labelling. I wish to show labels of towns that have capital letters (eg CRAWLEY) and not show the labels of towns with lowercase letters (eg Faygate)
The attribute table does not distinguish the different towns apart from their name. Is there a way of doing this ?
Best Answer
You don't really need rule-based styling for this.
Select the Show labels for this layer option (or rule-based if you prefer) and click the Expression icon and go to the Function Editor as shown below.
Create a new file (or edit an existing one) and enter the following:
Click Load then go to the Expression tab and type the following:
Then Apply all changes. Your labels should now only contain those which are all capital letters.
Example:
Before running the function:
After running the function: