call the function re.compile with an argument string '(%s.*?%s|%s.*?%s|%s.*?%s)', substitute all occurrences of '%s' with,
tag_re = ( re . compile ( '(%s.*?%s|%s.*?%s|%s.*?%s)' % ( re . escape ( BLOCK_TAG_START ) , re . escape ( BLOCK_TAG_END ) , re . escape ( VARIABLE_TAG_START ) , re . escape ( VARIABLE_TAG_END ) , re . escape ( COMMENT_TAG_START ) , re . escape ( COMMENT_TAG_END ) ) ) )