I want to pull out capitalized words that don’t start a sentence along with the previous and following word.
I’m using:
(\w*)\b([A-Z][a-z]\w*)\b(\w*)
replace with:
$1 -- $2 -- $3
Edit: It’s only returning the $2. Will try suggestions.
And regarding natural language? Don’t care for this thing. I just want to see where capitals show up in a sentence so I can figure out if they’re proper or not.
How about this?
This doesn’t take into account anything non-alphabetic though. It also assumes that all words are separated by a single whitespace character. You will need to modify it if you want more complex support.