re.U and re.S, substitute the result for re_chars. call the function re.compile with 2 arguments: raw string '<(/)?([^ ]+?)(?:(\s*/)| .*?)?>' and bitwise OR performed with 2 operands,
re_tag = re . compile ( r'<(/)?([^ ]+?)(?:(\s*/)| .*?)?>' , re . S )