import re
 
regex = r"^```[^\S\r\n]*[a-z]*(?:\n(?!```$).*)*\n```"
txt = ("Problem with encoding a very large BigInteger or BigDecimal without fraction\n\n"
            "We have an issue to encode a very large BigDecimal. For example, when I tried to encode _7.533938258014959827307132527342E+545_ I got the following error:\n\n"
            "``` java\n"
            "Error com.n1analytics.paillier.EncodeException: Input value cannot be encoded.\n"
            "at com.n1analytics.paillier.StandardEncodingScheme.encode(StandardEncodingScheme.java:115)\n"
            "at com.n1analytics.paillier.StandardEncodingScheme.encode(StandardEncodingScheme.java:239)\n"
            "...\n"
            "```\n\n"
            "The reason why I got the error is as follows:")
 
txt = re.sub(regex, '', txt, 0, re.MULTILINE)
print(txt)