# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"^\R\d{4}\R{2}"
test_str = ("19/10/2018 CCHAPC C 06/06/1949 10168259 RRKK323224 454 909 1339\n\n"
"1198\n\n"
"21/10/2018 CCHES C 19/05/1946 10034850 RRKS589180 490 589 4964")
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