for w in words:
    if w['case']:
        r = re.compile('(^|\\s)#?%s' % w['word'], re.IGNORECASE | re.MULTILINE)
else:
    r = re.compile('(^|\\s)#?%s' % w['word'], re.MULTILINE)
if r.search(status):
    pass
Python regex multiple search