#for pattern matching

#step1 we have to import re module

import re

matcher= re.finditer("ab","abababababababab")
count=0
for match in matcher:
    print(match.start())
    print(match.group())

    count+=1
print("count",count)
987f683b47482bc7d2e97b66773d5f2ab7b42186
<mask token>

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

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

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

#for pattern matching

#step1 we have to import re module

import re

matcher= re.finditer("ab","abababababababab")
count=0
for match in matcher:
    print(match.start())
    print(match.group())

    count+=1
print("count",count)