Reputation: 89
So, something like [A-Z] will match capital letters. How can I match lines that are entirely in capitals(or have whitespaces/whitespace-like entities)? So, in the example below, I want to eradicate the first line and keep all the rest...
EVIL WIZARD
Ye insolent peasant swine!
By the demonic creatures
Resident in my ancient beard
Ye shall know true misery
Before this day is done!
[EVIL WIZARD laughs maniacally as hordes of rodents eat everything in sight]
Given my screenplay writing skills, maybe a regex to remove all the text would be more appropriate, but hey...
Upvotes: 2
Views: 2782
Reputation: 626748
You can use ^([A-Z\s]+)$
regex to select lines that only contain words in UPPERCASE (but no punctuation).
If you want to select lines with uppercase words, you can use \b[A-Z]+\b
regex.
Do not forget to select Match Case option!
Upvotes: 3