The following code matches the word ‘meeting’ in the given string.
It uses positive look-ahead and look-behind assertions to respect enclosing characters but without including them in the match.
import re s = """http://www.google.com/meeting_agenda_minutes.html""" result = re.findall(r'(?<=[\W_])meeting(?=[\W_])', s) print result
['meeting']