Regex to match uppercase Expressions and Words
问题 Using Sublime Text 3 I want to extract only uppercase words and expressions from a text. Example: Hello world! It's a SUNNY DAY for all. If I use the find tool, I can extract all uppercase words separately by using this regex: \b[A-Z]+\b The results are SUNNY and DAY, but I would like to consider SUNNY DAY as a whole to extract trough the find tool, without leaving behind simple words like in: It's SUNNY today. 回答1: You can simply use \b[A-Z]+(?:\s+[A-Z]+)*\b See regex demo I added (?:\s+[A-Z