New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
re
module: search() vs. match()
section should mention fullmatch()
#98906
Comments
re
module: search() vs. match()
should should mention fullmatch()
re
module: search() vs. match()
section should mention fullmatch()
That seems like a good idea. Just this week I was looking at search vs. match, and completely forgot about fullmatch. |
Can I add the |
adding re.fullmatch with it's examples
Great that there's interest enhancing this! One thing to decide is should the section header be changed or not. Mentioning only search and match when there's also fullmatch would be odd, but the change would break possible internal and external links to this section. Internal links can be fixed as part of this change, though, and external ones can be preserved by adding an explicit link target with the old name. What approach has been used in this kind of situations earlier? |
I think it's fine to keep the section name, especially as fullmatch is a variant of |
+1 I would also like That said, a cross-reference between the two entries doesn't make sense. The entries are already adjacent to one another. And we don't want to get into the business of stylistic nudging by having one feature "advertise" another. Instead, it would be better to beef up the examples to show off |
…ention ```fullmatch()``` (GH-98916) Mention fullmatch along with search and match.
…ould mention ```fullmatch()``` (pythonGH-98916) Mention fullmatch along with search and match. (cherry picked from commit e0f91de) Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
…ould mention ```fullmatch()``` (pythonGH-98916) Mention fullmatch along with search and match. (cherry picked from commit e0f91de) Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Thanks, @ramvikrams ! |
…hould mention ```fullmatch()``` (GH-98916) (GH-99912) GH-98906 ```re``` module: ```search() vs. match()``` section should mention ```fullmatch()``` (GH-98916) Mention fullmatch along with search and match. (cherry picked from commit e0f91de) Co-authored-by: ram vikram singh <ramvikrams243@gmail.com> Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
…hould mention ```fullmatch()``` (GH-98916) (GH-99913) GH-98906 ```re``` module: ```search() vs. match()``` section should mention ```fullmatch()``` (GH-98916) Mention fullmatch along with search and match. (cherry picked from commit e0f91de) Co-authored-by: ram vikram singh <ramvikrams243@gmail.com> Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
pekkaklarck commentedOct 31, 2022
•
edited by bedevere-bot
The docs at https://docs.python.org/3/library/re.html#search-vs-match start with
but there has been re.fullmatch() since Python 3.4. I believe the third method should be mentioned and should get its own examples as well.
re
module:search() vs. match()
section should mentionfullmatch()
#98916re
module:search() vs. match()
section should mentionfullmatch()
(GH-98916) #99912re
module:search() vs. match()
section should mentionfullmatch()
(GH-98916) #99913The text was updated successfully, but these errors were encountered: