purpose
Find all occurrences of "Bernie Sanders" that are not marked \senator{ }. I want to list matches with grepfor visual inspection. Then I would like to fix all files recursively with a single command (for example sed, which does not support non-greedy regular expression).
Sample file
Bernie Sanders
\senator{Bernie Sanders}
The senator of Vermont is \senator{Bernie Sanders}.
A \texttt{senator of Vermont} is Bernie Sanders.
A senator of Vermont is \textit{Bernie Sanders}.
\textit{Bernie Sanders} is a senator of Vermont.
Is this the same Bernie Sanders?
Is Bernie Sanders a good senator?
Will we ever see a \textbf{President Bernie Sanders}?
Problem
A regular expression should not "accidentally" interfere with other commands
Attempt:
\[^senator]*{Bernie Sanders
I'm not sure how to exclude the senator, but include spaces and other teams in front of Bernie Sanders.
Start
- can be done with a space
- not running \ senator {
- may be first in line
End