import re

text_to_search = 'abcdefghijklmnopqrstuvwxyzabc' \
                 'ABC' \
                 '1234567890' \
                 'Ha HaHa' \
                 'cnn.com' \
                 '516-516-5167' \
                 '718 718 7189' \
                 '917.917.9178' \
                 'Mr. Nur' \
                 'Mr Smith' \
                 'Ms Davis' \
                 'Mrs. Robinson' \


sentence = 'Start a sentence and then bring it to an end'
email = 'These are the email addrss we will be testing in regular expression example' \
        'nurShahjalal@pytho.com ' \
        'nur.shahjalal@python.net' \
        'nur_shahjalal@python.org' \
        'Nur_Shahjalal@pyhton.edu' \
        'end of emmail address'

# using find iter method , search for only abc pattern
# it case sensetive, maintaining  sequence, it will not returning cba or bac

pattern = re.compile('abc')
matches = pattern.finditer(text_to_search)
for match in matches:
    print(match) # return iter object
    print(match.group())

print('**' * 60)






ee043af714bea7aa55fa1e099b02215de5659ad6
<mask token>

<mask token>
for match in matches:
    print(match)
    print(match.group())
print('**' * 60)

<mask token>
text_to_search = (
    'abcdefghijklmnopqrstuvwxyzabcABC1234567890Ha HaHacnn.com516-516-5167718 718 7189917.917.9178Mr. NurMr SmithMs DavisMrs. Robinson'
    )
sentence = 'Start a sentence and then bring it to an end'
email = (
    'These are the email addrss we will be testing in regular expression examplenurShahjalal@pytho.com nur.shahjalal@python.netnur_shahjalal@python.orgNur_Shahjalal@pyhton.eduend of emmail address'
    )
pattern = re.compile('abc')
matches = pattern.finditer(text_to_search)
for match in matches:
    print(match)
    print(match.group())
print('**' * 60)

import re
text_to_search = (
    'abcdefghijklmnopqrstuvwxyzabcABC1234567890Ha HaHacnn.com516-516-5167718 718 7189917.917.9178Mr. NurMr SmithMs DavisMrs. Robinson'
    )
sentence = 'Start a sentence and then bring it to an end'
email = (
    'These are the email addrss we will be testing in regular expression examplenurShahjalal@pytho.com nur.shahjalal@python.netnur_shahjalal@python.orgNur_Shahjalal@pyhton.eduend of emmail address'
    )
pattern = re.compile('abc')
matches = pattern.finditer(text_to_search)
for match in matches:
    print(match)
    print(match.group())
print('**' * 60)

import re

text_to_search = 'abcdefghijklmnopqrstuvwxyzabc' \
                 'ABC' \
                 '1234567890' \
                 'Ha HaHa' \
                 'cnn.com' \
                 '516-516-5167' \
                 '718 718 7189' \
                 '917.917.9178' \
                 'Mr. Nur' \
                 'Mr Smith' \
                 'Ms Davis' \
                 'Mrs. Robinson' \


sentence = 'Start a sentence and then bring it to an end'
email = 'These are the email addrss we will be testing in regular expression example' \
        'nurShahjalal@pytho.com ' \
        'nur.shahjalal@python.net' \
        'nur_shahjalal@python.org' \
        'Nur_Shahjalal@pyhton.edu' \
        'end of emmail address'

# using find iter method , search for only abc pattern
# it case sensetive, maintaining  sequence, it will not returning cba or bac

pattern = re.compile('abc')
matches = pattern.finditer(text_to_search)
for match in matches:
    print(match) # return iter object
    print(match.group())

print('**' * 60)





