Made regex less greedy
parent
daf26dce13
commit
404956ef89
2
main.py
2
main.py
|
@ -13,7 +13,7 @@ sub = reddit.subreddit('IsAnybodyHere')
|
||||||
for comment in rall.stream.comments():
|
for comment in rall.stream.comments():
|
||||||
|
|
||||||
# Match with regex
|
# 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:
|
if match:
|
||||||
|
|
||||||
# Extract a description of the needed person
|
# Extract a description of the needed person
|
||||||
|
|
Loading…
Reference in New Issue