[issue41259] Find adverbs is not correct

2020-07-09 Thread Rim Chatti


New submission from Rim Chatti :

re.findall(r"\w+ly", text) does not find all adverbs in a sentence, it finds 
words that contain ly (not ending with ly) :
if text= 'andlying clearly', output: [andly, clearly]
which is wrong! 
the right way to do this is re.findall(r'\b(\w+ly)\b',text)
output= clearly!

--
assignee: docs@python
components: Documentation
messages: 373406
nosy: Rim Chatti, docs@python
priority: normal
severity: normal
status: open
title: Find adverbs is not correct
versions: Python 3.5

___
Python tracker 
<https://bugs.python.org/issue41259>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41259] Find adverbs is not correct on the documentation

2020-07-09 Thread Rim Chatti


Change by Rim Chatti :


--
title: Find adverbs is not correct -> Find adverbs is not correct on the 
documentation

___
Python tracker 
<https://bugs.python.org/issue41259>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41259] Find adverbs is not correct on the documentation

2020-07-09 Thread Rim Chatti


Rim Chatti  added the comment:

re.findall(r"\w+ly", text) does not find all adverbs in a sentence, it finds 
words that contain ly (not ending with ly) :
if text= 'andlying clearly', output: [andly, clearly]
which is wrong! 
the right way to do this is re.findall(r'\b\w+ly\b',text)
output= clearly!

--
components: +Regular Expressions -Documentation
keywords: +patch
message_count: 2.0 -> 3.0
nosy: +ezio.melotti, mrabarnett
nosy_count: 3.0 -> 5.0
pull_requests: +20569
stage:  -> patch review
type:  -> behavior
pull_request: https://github.com/python/cpython/pull/21420

___
Python tracker 
<https://bugs.python.org/issue41259>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com