import re
def find_drink_links_using_regex_matching(content):
    regex = r"https:\/\/drive\.google\.com\/file\/d\/[a-zA-Z0-9_-]+\/view\?usp=drive_web"
    matches = re.finditer(regex, content, re.MULTILINE)
    all_matched_drive_link = []
    for matchNum, match in enumerate(matches, start=1):

        print("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum=matchNum, start=match.start(),
                                                                            end=match.end(), match=match.group()))
        all_matched_drive_link.append(match.group())
        for groupNum in range(0, len(match.groups())):
            groupNum = groupNum + 1

            print("Group {groupNum} found at {start}-{end}: {group}".format(groupNum=groupNum,
                                                                            start=match.start(groupNum),
                                                                            end=match.end(groupNum),
                                                                            group=match.group(groupNum)))
    return all_matched_drive_link

def find_s3_file_links_using_regex_matching(content, regex):
    matches = re.finditer(regex, content, re.MULTILINE)
    all_matched_s3_link = []
    for matchNum, match in enumerate(matches, start=1):

        print("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum=matchNum, start=match.start(),
                                                                            end=match.end(), match=match.group()))
        all_matched_s3_link.append(match.group())
        for groupNum in range(0, len(match.groups())):
            groupNum = groupNum + 1

            print("Group {groupNum} found at {start}-{end}: {group}".format(groupNum=groupNum,
                                                                            start=match.start(groupNum),
                                                                            end=match.end(groupNum),
                                                                            group=match.group(groupNum)))
    return all_matched_s3_link



# content = """
# <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div dir="ltr">Hi Team,<div><br></div>PFA today's Inventory.<div><div class="gmail_chip gmail_drive_chip" style="width:396px; height:18px; max-height:18px; background-color:rgb(245,245,245); padding:5px; font-family:arial; font-weight:bold; font-size:13px; border:1px solid rgb(221,221,221); line-height:1"><a href="https://drive.google.com/file/d/1oKVk_eZfTY3rC1QVgEcC9qvOshU4MveD/view?usp=drive_web" target="_blank" aria-label="20231208_043945_13772_jp5aj_74305a65-a82a-4e66-8526-62b632b4b65e.CSV" style="display:inline-block; max-width:366px; overflow:hidden; text-overflow:ellipsis; text-decoration-line:none; padding:1px 0px; border:none"><img src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png" style="vertical-align:bottom; border:none">&nbsp;<span dir="ltr" style="vertical-align:bottom; text-decoration:none">20231208_043945_13772_jp5aj_74305a65-a82a-4e66-...</span></a><img src="//ssl.gstatic.com/ui/v1/icons/common/x_8px.png" style="opacity:0.55; float:right; top:-1px; display:none"></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div><b>Hina Naz</b></div><div>Senior Officer- Omnichannel</div><div>Mob : +918887501031</div><div><img src="https://lh5.googleusercontent.com/pgA1MEeM-DJ64_jmU0kn8N6KaUdLxnfAhtT6rf2KOE-c-DCDlJvo4AIqj_3jVJJukNe0q0DwHXfxeyNWn7EgGMQ41m6v4TNJjmgwP-DIwqr4VEZY1gMRk2-4saq73BlOLYB7JNORcBI" width="200" height="52"><br></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 6, 2023 at 5:48 PM Hina Naz &lt;<a href="mailto:hina.naz@myntra.com">hina.naz@myntra.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex"><div dir="ltr">PFA<div><br></div><div><div class="gmail_chip gmail_drive_chip" style="width:396px; height:18px; max-height:18px; background-color:rgb(245,245,245); padding:5px; font-family:arial; font-weight:bold; font-size:13px; border:1px solid rgb(221,221,221); line-height:1"><a href="https://drive.google.com/file/d/1Td6-JSZqfym0Yp39k6sB7MmYsIF89VNA/view?usp=drive_web" aria-label="6262_inv (1).csv" target="_blank" style="display:inline-block; max-width:366px; overflow:hidden; text-overflow:ellipsis; text-decoration-line:none; padding:1px 0px; border:none"><img src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png" style="vertical-align:bottom; border:none">&nbsp;<span dir="ltr" style="vertical-align:bottom; text-decoration:none">6262_inv (1).csv</span></a><img style="opacity:0.55; float:right; display:none"></div><br><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr">Regards,<div><b>Hina Naz</b></div><div>Senior Officer- Omnichannel</div><div>Mob : +918887501031</div><div><img src="https://lh5.googleusercontent.com/pgA1MEeM-DJ64_jmU0kn8N6KaUdLxnfAhtT6rf2KOE-c-DCDlJvo4AIqj_3jVJJukNe0q0DwHXfxeyNWn7EgGMQ41m6v4TNJjmgwP-DIwqr4VEZY1gMRk2-4saq73BlOLYB7JNORcBI" width="200" height="52"><br></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 6, 2023 at 10:26 AM Akshay S [ALBL] &lt;<a href="mailto:akshay.s@arvindfashions.com" target="_blank">akshay.s@arvindfashions.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex"><div><div dir="ltr"><div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">Hi Hina,</div><div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"><br></div><div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">Pls confirm is this right data to consume?</div><div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"><br></div><div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"><br></div><div id="m_-4255508538083677581m_-1989630473958759769Signature"><div><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">Thanks &amp; Regards</span></div><div><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">&nbsp; &nbsp; &nbsp; Akshay S</span></div></div><div id="m_-4255508538083677581m_-1989630473958759769appendonsend"></div><hr style="display:inline-block; width:98%"><div id="m_-4255508538083677581m_-1989630473958759769divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> <a href="mailto:hina.naz@myntra.com" target="_blank">hina.naz@myntra.com</a> &lt;<a href="mailto:hina.naz@myntra.com" target="_blank">hina.naz@myntra.com</a>&gt;<br><b>Sent:</b> Wednesday, December 6, 2023 9:46 AM<br><b>To:</b> Abhay Kumar &lt;<a href="mailto:abhay.kumar@arvindfashions.com" target="_blank">abhay.kumar@arvindfashions.com</a>&gt;; Shashidhar M R &lt;<a href="mailto:shashidhar.mr@arvindfashions.com" target="_blank">shashidhar.mr@arvindfashions.com</a>&gt;; Arvind; Seema Jain &lt;<a href="mailto:seema.jain@arvindfashions.com" target="_blank">seema.jain@arvindfashions.com</a>&gt;; Vinayak Singh &lt;<a href="mailto:vinayak.singh@arvindfashions.com" target="_blank">vinayak.singh@arvindfashions.com</a>&gt;; J Govindaraju &lt;<a href="mailto:j.govindaraju@arvindfashions.com" target="_blank">j.govindaraju@arvindfashions.com</a>&gt;; Manu Srivastava &lt;<a href="mailto:manu.srivastava@arvindfashions.com" target="_blank">manu.srivastava@arvindfashions.com</a>&gt;; <a href="mailto:hina.naz@myntra.com" target="_blank">hina.naz@myntra.com</a> &lt;<a href="mailto:hina.naz@myntra.com" target="_blank">hina.naz@myntra.com</a>&gt;; Aritra Sarkar &lt;<a href="mailto:aritra.sarkar@arvindfashions.com" target="_blank">aritra.sarkar@arvindfashions.com</a>&gt;; Saka Sandesh &lt;<a href="mailto:saka.sandesh@arvindfashions.com" target="_blank">saka.sandesh@arvindfashions.com</a>&gt;; Akshay S [ALBL] &lt;<a href="mailto:akshay.s@arvindfashions.com" target="_blank">akshay.s@arvindfashions.com</a>&gt;<br><b>Subject:</b> Inventory report | 2023-12-06 | 6262</font> <div>&nbsp;</div></div><div>Dear Business Partner,<br><br>Please find the inventory report for 2023-12-06<br><br>For any queries, contact your spoc person. <br><br>Thanks and Regards,<br>Sahil Bhatia<br><br><div><div><div><div><div><div><div><div><div><div><div><div><div><div dir="ltr"><p style="text-align:justify"><i>-----------------------------------------------------------------------------------------</i></p><p style="text-align:justify"><i>Disclaimer:&nbsp;</i></p><p style="text-align:justify"><i>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify to&nbsp;<a href="mailto:information.security@myntra.com" target="_blank">information.security@myntra.com</a>. This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</i><u></u><u></u></p><p style="text-align:justify">&nbsp;<u></u><u></u></p><p style="text-align:justify"><i>Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the organization. Any information on shares, debentures or similar instruments, recommended product pricing, valuations and the like are for information purposes only. It is not meant to be an instruction or recommendation, as the case may be, to buy or to sell securities, products, services nor an offer to buy or sell securities, products or services unless specifically stated to be so on behalf of the Flipkart group. Employees of&nbsp;the Flipkart group of companies are expressly required not to make defamatory statements and not to infringe or&nbsp;</i><i>authorize&nbsp;</i><i>any infringement of copyright or any other legal right by email communications. Any such communication is contrary to organizational policy and outside the scope of the employment of the individual concerned. The organization will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising.</i></p></div><div dir="ltr"><p style="text-align:justify"><u></u></p><p style="text-align:justify">&nbsp;<u></u><u></u></p><p style="text-align:justify"><i>Our organization accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information&nbsp;</i>provided,<i>&nbsp;unless that information is subsequently confirmed in writing. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</i></p><p style="text-align:justify"><i>-----------------------------------------------------------------------------------------</i></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>The information contained in this electronic message and any attachments to this message are intended solely for the exclusive use of the individual or entity to whom it is addressed. It may contain proprietary, confidential or legally privileged information. If you are not the intended recipient, you are hereby notified that any disclosure, dissemination, distribution or copying this e-mail is strictly prohibited and may be unlawful. Please notify the sender immediately and destroy all copies of this message and any attachments. Computer viruses can be transmitted via email. The company is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. <a href="http://www.arvind.com" target="_blank">www.arvind.com</a> </div></div></blockquote></div></blockquote></div><br><div><div><div><div><div><div><div><div><div><div><div><div><div><div dir="ltr"><p style="text-align:justify"><i>------------------------------<wbr>------------------------------<wbr>-----------------------------</i></p><p style="text-align:justify"><i>Disclaimer:&nbsp;</i></p><p style="text-align:justify"><i>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify to&nbsp;<a href="mailto:information.security@myntra.com" target="_blank">information.security@<wbr>myntra.com</a>. This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</i><u></u><u></u></p><p style="text-align:justify">&nbsp;<u></u><u></u></p><p style="text-align:justify"><i>Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the organization. Any information on shares, debentures or similar instruments, recommended product pricing, valuations and the like are for information purposes only. It is not meant to be an instruction or recommendation, as the case may be, to buy or to sell securities, products, services nor an offer to buy or sell securities, products or services unless specifically stated to be so on behalf of the Flipkart group. Employees of&nbsp;the Flipkart group of companies are expressly required not to make defamatory statements and not to infringe or&nbsp;</i><i>authorize&nbsp;</i><i>any infringement of copyright or any other legal right by email communications. Any such communication is contrary to organizational policy and outside the scope of the employment of the individual concerned. The organization will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising.</i></p></div><div dir="ltr"><p style="text-align:justify"><u></u></p><p style="text-align:justify">&nbsp;<u></u><u></u></p><p style="text-align:justify"><i>Our organization accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information&nbsp;</i>provided,<i>&nbsp;unless that information is subsequently confirmed in writing. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</i></p><p style="text-align:justify"><i>------------------------------<wbr>------------------------------<wbr>-----------------------------</i></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></body></html>
# """
#
# all_matched_drive_link = find_drink_links_using_regex_matching(content=content)
#
# print(all_matched_drive_link)