top of page

Regular Expression Search for Multiple Words in ALL CAPS

Searching for sentences using multiple consecutive words in all capital letters can be an effective way to track down email or other documents in which employees express surprise, anger, excitement or other strong emotion. The following regular expression search will locate any instances where at least four words appear in ALL CAPS in a sentence:


[A-Z] looks for any of the 26 capital letters, and {2,} finds instances in which words of 2 or more characters are in all capital letters. \b searches for a word boundary, and \s searches for a whitespace. The sequence \b[A-Z]{2,}\s can be repeated as many times as necessary to capture longer sequences of fully capitalized words.

See this example of how the search is run in NotePad++


bottom of page