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:


(\b[A-Z]{2,}\s[A-Z]{2,}\b\s[A-Z]{2,}\b\s[A-Z]{2,}\b)


[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++





Contact Me With Your Litigation Support Questions:

seankevinoshea@hotmail.com

  • Twitter Long Shadow

© 2015 by Sean O'Shea . Proudly created with Wix.com