PatternRegex

Find ALL-CAPS words

Flag words typed in ALL CAPS — genuine acronyms and accidental shouting alike — so you can review tone or pull out initialisms.

Last updated

Patterng
\b[A-Z]{2,}\b
Open in Regex Tester & Builder

Matches

  • Please send the NDA today
  • This is URGENT

Doesn’t match

  • A cat sat on the mat
  • The Cat Sat on a Mat

Why it’s written this way

\b[A-Z]{2,}\b requires at least two consecutive uppercase letters bounded by word boundaries on both sides, so it fires only on a whole word that is entirely capitalized, not a word that merely starts with one.

The {2,} lower bound is deliberate: a single capital letter, like the start of an ordinary sentence or a lone initial, doesn't count as shouting.

Edge cases to know

  • It can't tell a genuine acronym like NDA or API from a sentence typed in all caps out of frustration — both look identical to the pattern.
  • A word like 'NASA2' or the plural 'FAQS' still matches on its uppercase run, since trailing digits and a lowercase-adjacent S sit outside what the pattern checks.
  • Single capital letters are excluded by design, so an initial such as the J in 'J. Smith' never triggers a false positive.

Related in Patterns