The following fragment of code comes from my github repository found here. It opens a binary file, and extracts the text within <header> tags. These are the crucial lines:
gbxfile = open(filename,'rb')
gbx_data = gbxfile.read()
gbx_header = b'(<header)((?s).*)(</header>)'
header_intermediate = re.findall(gbx_header, gbx_data)
The script works BUT it receives the following Deprecation Warning:
DeprecationWarning: Flags not at the start of the expression b'(<header)((?s).*)(</' (truncated)
header_intermediate = re.findall(gbx_header, gbx_data)
What is the correct use of the regular expression in gbx_header, so that this warning is not displayed?