# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"^\w{42} "
test_str = ("0x8DA1937198d1A51d735aa3E57423183888539E48 0x92b7b421992ef490f3b75898ec0e511f1a5c02422819d89719b20362b023ce4f\n"
"0x5D9D8F9F0E0E3D6B07C4Fa829Bf0550D5846E6e2 0x4a7657258f0bc1744c32bed405c0b53b5addcf210f8c15a8f69d168b0ccfc492g2\n\n")
subst = ""
# You can manually specify the number of replacements by changing the 4th argument
result = re.sub(regex, subst, test_str, 0, re.MULTILINE)
if result:
print (result)
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html