Made regex less greedy
This commit is contained in:
parent
daf26dce13
commit
404956ef89
2
main.py
2
main.py
@ -13,7 +13,7 @@ sub = reddit.subreddit('IsAnybodyHere')
|
||||
for comment in rall.stream.comments():
|
||||
|
||||
# Match with regex
|
||||
match = re.search("(does|has|is)(n't)? (any one|anyone|someone|anybody) (here)? (.*)\?", comment.body, re.IGNORECASE)
|
||||
match = re.search("(does|has|is)(n't)? (any one|anyone|someone|anybody) (here)? (.*?)\?", comment.body, re.IGNORECASE)
|
||||
if match:
|
||||
|
||||
# Extract a description of the needed person
|
||||
|
Loading…
Reference in New Issue
Block a user