Please indicate me a message if it already exists for this question.
How can I effectively add word boundary syntax to a list of strings?
So, for example, I want to make sure that the words below in badpositionscorrespond only to the word as a whole, so I would like to use re.search('\bword\b', text).
How to get words in poor positions, to take shape ['\bPresident\b', '\bProvost\b'], etc.
text = ['said Duke University President Richard H. Brodhead. "Our faculty look forward']
badpositions = ['President', 'Provost', 'University President', 'Senior Vice President']
source
share