Replace email id by HTML Tag to make a hyperlink inside the text

Replace email id by HTML Tag to make a hyperlink inside the text

I have a text as follows

I have a text as follows

For further details, please contact [email protected]

I want to replace the email ID mentioned in the above text by <a href "[email protected]">[email protected]</a> So that the email ID would become a clickable object when the above text would be presented on web page

So far I have tried out following

text = 'For further details, please contact [email protected]'
email_pat = re.findall(r'[\w\.-][email protected][\w\.-]+\.\w+',text)
email_str = ' '.join(email_pat) #converts the list to string
text_rep = ext.replace(email_str,'<a href "email_str">email_str</a>')

The above code replace the email string but instead of creating hyperlink it actually does the following

For further details, please contact <a href "email_str">email_str</a>

Is there any way to tackle this?

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Top Python Development Companies | Hire Python Developers

After analyzing clients and market requirements, TopDevelopers has come up with the list of the best Python service providers. These top-rated Python developers are widely appreciated for their professionalism in handling diverse projects. When...

An Introduction to Regex in Python

An Introduction to Regex in Python

The Ultimate Guide to Regex (Regular Expressions) in Python

In this Python tutorial, we’ll learning about Regex (Regular Expressions) in Python. Learn how Python regex works, and be able to use the basic patterns and functions in Python’s regex module, re, for to analyze text strings.