I have html content I want to get comment from this content
content = """<html>
<body>
<!--<h1>test</h1>-->
<!--<div>
<img src='x'>
</div>-->
Blockquote
<!--
<div>
<img src='xe'>
</div>
-->
</body>
</html>"""
i use this regex
regex_str = "<!--((\n|\r)+)?((.*?)+((\n|\r)+)?)+-->"
When running this line in Python
re.findall(regex_str,content)
It works successfully
but when running in jython
This error appears
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/share/java/jython-2.7.2.jar/Lib/re$py.class", line 177, in findall
File "/usr/share/java/jython-2.7.2.jar/Lib/re$py.class", line 242, in _compile
sre_constants.error: nothing to repeat