Jul-06-2023, 08:17 AM
Hi,
I have this regex:
I have this regex:
Quote:content = """encoding="UTF-8"\?>(.*?)^<\?xml version="1.0"
MYCO Please have a look at this building’s premium. It looks to be a very high rate. The client has a few policies with MYCO as supporting business. 00000 COUTINHO COUTINHO Thanks WilL Sel: 000 000 00 Primary Cooperative Ltd Quanta Primary Ltd i.
encoding="UTF-8"\?>(.*?)^<\?xml version="1.0"
Dear Mr New Co thank you and your team for all the assistance throughout the years. Unfortunately, I have decided to depart from Origin and MYCO for personal reasons. I've attached the cancellation letter for my policy to be implemented Chemical Engineering t: +000 000 4292 c: +27 (0) 00 000 1002 w: 0002 2805 7135 PO Box 1906 bigville 0000 New Way, Bigville, which is the property of the sender. Should you have received this email in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the sender of this email be liable to any party for any direct, indirect, special or other consequential damages for any use of this email. For the detailed e-mail disclaimer please refer to. """
found = re.findall(r'encoding="UTF-8"\?>(.*?)^<\?xml version="1.0"', content, re.DOTALL) print(found)
Output:[]
My understanding is that "findall" return the List of matches from the text you are searching. I do have a match in my text. can someone explain to me why am I getting nothing in return?