Commit 3ad69ee7 by BellCodeEditor

auto save

parent f0c715f8
Showing with 12 additions and 0 deletions
import re
needle=input()
haystak=input()
localcation=re.search(r'\b{}\b'.format(needle),haystak,re.IGNORECASE)
pos=-1
match_count = ''
print(localcation)
if localcation:
pos=localcation.span()[0]
match_count=len(re.findall(r'\b{}\b'.format(needle),haystak,re.IGNORECASE))
print(match_count,pos)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment