<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def term_regex(term):
 """ Returns a case-insensitive regex for searching terms """

    return re.compile(r'^{0}$'.format(re.escape(term)), re.IGNORECASE)