Python Exercise 11: Regex Email Extractor | Python Tutorials For Absolute Beginners In Hindi #96

preview_player
Показать описание


Best Hindi Videos For Learning Programming:

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

import re
strg = """pass your string here"""

pattern =
match = pattern.findall(strg)
for matches in match:
print(matches)

pujachatterjee
Автор

sir bahut achha course hai aapke har course ka effort is fabulous

tanishjain
Автор

I am a novice in this field, but I want to give a try.

ramchandrainamdar
Автор

web scrapping ki ek video bna do please.

apica
Автор

import re
import time
string = ''pass your string"
print("Welcome to Email Collector")
q = input("Press 1 to start:\n")
email =

print("Processing started...")
matches = email.findall("pass your string")
for i, emails in enumerate(matches):
with open("Myemails.txt", "a") as f:
f.write(f"{i+1}.{emails}")
f.write("\n")
time.sleep(3)
print("All emails are successfully collected in a text file(Myemails.txt)")

smartnewshindi
Автор

bro can you teach us how to use regex in searching text in file and processing it? it will be very beneficial

honeysingh-lufq
Автор

Mail = re.compile(r'@')
Email=Mail.finditer(string)
for mail in Email:
a = mail
a=str(a)
b=a.split(";")[1].split("(")[1].split(")")[0].split(", ")[0]
b = int(b)
print("The place of mail is", b)

PuppyHaven-
Автор

I'm 1st #love u bro .
How can I get a job as a data science after 12th no more degree.

And how to work freelancing as data science real world projects.

kajalroy
Автор

At the end there is str1 named variable where you are suppose to pass ur own string
Here is my solution


import re
import time
def email_rewriter(str1):
i=1

for m_word in m_words:
m_word_str=str(m_word)
patt2=re.compile(r'\d+, \s\d+').finditer(m_word_str)
for number in patt2:
if len(str(number))==50:
time.sleep(0.25)
print(f"{i} Email compiled")
with open("Sorted_Emails.txt", "a") as compile_email:

i+=1
if len(str(number))==52:
time.sleep(0.25)
print(f"{i} Email compiled")
with open("Sorted_Emails.txt", "a") as compile_email:

i+=1
if __name__=='__main__':
str1="Pass your string here"
email_rewriter(str1)

glucose
Автор

Challenge Accepted .. Main Try karta hun!

RohanDasRD
Автор

challenge is accepted
and iam posting it

epicapitgaming
Автор

Sir please upload python pandas and numpy How to make dataframe please bro.

adz
Автор

# Email extractor/collector by regular expression
import re
# Email Pattern
pattern = re.findall(r"[\w._%+-]{1, 20}@[\w]{2, 20}.[A-Za-z]{2, 3}", garbage_str)

with open("email_lists", "w") as get_email:
for email in pattern:
get_email.write(email + "\n")

maowarisa
join shbcf.ru