def strip_comments(text):
regex = r'<STR_LIT>'<EOL>regex_inline = r'<STR_LIT>'  <EOL>lines = text.split('<STR_LIT:\n>')<EOL>for index, line in enumerate(lines):<EOL><INDENT>if re.search(regex, line):<EOL><INDENT>if re.search(r'<STR_LIT>' + regex, line, re.IGNORECASE):<EOL><INDENT>lines[index] = "<STR_LIT>"<EOL><DEDENT>elif re.search(regex_inline, line):<EOL><INDENT>lines[index] = re.sub(regex_inline, r'<STR_LIT>', line)<EOL><DEDENT><DEDENT><DEDENT>return '<STR_LIT:\n>'.join(lines)<EOL>
Comment stripper for JSON.