def delimiters_to_re(delimiters):
<EOL>delimiters = tuple(delimiters)<EOL>if delimiters in re_delimiters:<EOL><INDENT>re_tag = re_delimiters[delimiters]<EOL><DEDENT>else:<EOL><INDENT>open_tag, close_tag = delimiters<EOL>open_tag = '<STR_LIT>'.join([c if c.isalnum() else '<STR_LIT:\\>' + c for c in open_tag])<EOL>close_tag = '<STR_LIT>'.join([c if c.isalnum() else '<STR_LIT:\\>' + c for c in close_tag])<EOL>re_tag = re.compile(open_tag + r'<STR_LIT>' + close_tag, re.DOTALL)<EOL>re_delimiters[delimiters] = re_tag<EOL><DEDENT>return re_tag<EOL>
convert delimiters to corresponding regular expressions