Hi,
I have a text that I'm trying to create a pattern for, I got thud far:
I have a text that I'm trying to create a pattern for, I got thud far:
import re text = ''' image003.jpgimage/[email protected]:39:50truefalseimage001.jpgimage/[email protected]:39:50truefalseNJS Basson Snr Basson Familie Trust Gothoma Diggings NJS.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet41BB382125CA54438BDE8428DBDF8B6C@mns.internal.co.za868522019-04-01T12:39:50falsefalseNJS BASSON SNR.PDFapplication/pdfEBA76A0D4619594DB6951BE861F9FF9E@mns.internal.co.za3638912019-04-01T12:39:50falsefalse4798442019-04-01T12:39:31Z2019-04-01T12:39:[email protected] EscalationAgriCCC.Escalation@santam.co.zaSMTPMailboxtruetrueEternity [email protected] 000000000 ZZZZ ''' pattern = re.compile(r'image[\d]+.+') matches = pattern.finditer(text) for match in matches: print(match)Output:
Output:"<re.Match object; span=(681, 1413), match='image003.jpgimage/[email protected]>"
I'm looking for expression that can pick anything similar, close or exactly that, please help