so i am using re.search function to search for a substring, problem is at the end of the string there is repeating data and i only want to search to the first dataset declared
here is the code
file = open ("flash-ori", "rb").read().hex()
DTC_data = re.search("0080040004000100(.*)010202010202020202020202", file)
print (DTC_data.group())
here is what i get
0080040004000100**DATA**01020201020202020202020202020202010202020102020202010202020202020202020102020202020a0202020202020202020202020a02020102020202020202020202020202020202020202020202020202020202020202020101010102020101010102020101010102020101010102020101010101020201010101010202010102010101020202010102010101020202010202020102020201020202020102020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202010202010202010202010202010202020202010202020202010202020202010202020202020202020202020201020201020201020201020
here is what i want to do
0080040004000100**DATA**010202010202020202020202
all solutions much appritiated.