#pattern matching
# re(regular expression)__package for pattern matching
#finditer(method in regular expression)
#used for itrating
# import re
# count=0
# matcher=re.finditer('ab','abaaabbab')
# #print(matcher)
# for match in matcher:
#     count+=1
# print("count=",count)


import re
count=0
matcher=re.finditer('ab','abaabab')
for match in matcher:
    print("match available at",match.start())      #return positions
    print("group",match.group())                   #which object find match
    count+=1
print("count=",count)







5f18564807f98dba5741852e039914823c231e96
<mask token>

<mask token>
for match in matcher:
    print('match available at', match.start())
    print('group', match.group())
    count += 1
print('count=', count)

<mask token>
count = 0
matcher = re.finditer('ab', 'abaabab')
for match in matcher:
    print('match available at', match.start())
    print('group', match.group())
    count += 1
print('count=', count)

import re
count = 0
matcher = re.finditer('ab', 'abaabab')
for match in matcher:
    print('match available at', match.start())
    print('group', match.group())
    count += 1
print('count=', count)

#pattern matching
# re(regular expression)__package for pattern matching
#finditer(method in regular expression)
#used for itrating
# import re
# count=0
# matcher=re.finditer('ab','abaaabbab')
# #print(matcher)
# for match in matcher:
#     count+=1
# print("count=",count)


import re
count=0
matcher=re.finditer('ab','abaabab')
for match in matcher:
    print("match available at",match.start())      #return positions
    print("group",match.group())                   #which object find match
    count+=1
print("count=",count)






