➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 gregory.p.smith
收信人 ezio.melotti, gregory.p.smith, matthew.suozzo, mrabarnett, serhiy.storchaka
日期 2022-02-05.02:36:29
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1644028589.79.0.970255123007.issue42353@roundup.psfhosted.org>
In-reply-to
内容
What do other APIs in widely used languages do with regex terminology?  We appear to be the only popular language who anchors to the start of a string with an API named "match".

libpcre C: uses "match" to mean what we call "search" - https://www.pcre.org/current/doc/html/pcre2_match.html

Go: Uses "Match" to mean what we call "search" - https://pkg.go.dev/regexp#Match

JavaScript: Uses "match" to mean what we call "search" - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match

Java: Uses "matches" (I think meaning what we call fullmatch?) - https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html

C++ RE2: explicit "FullMatch" and "PartialMatch" APIs - https://github.com/google/re2 

Jave re2j: uses "matches" like Java regex.Pattern - https://github.com/google/re2j 

Ruby: Uses "match" as we do "search" - https://ruby-doc.org/core-2.4.0/Regexp.html

Rust: Uses match as we do "search" - https://docs.rs/regex/latest/regex/
历史
日期 用户 动作 参数
2022-02-05 02:36:29gregory.p.smith修改recipients: + gregory.p.smith, ezio.melotti, mrabarnett, serhiy.storchaka, matthew.suozzo
2022-02-05 02:36:29gregory.p.smith修改messageid: <1644028589.79.0.970255123007.issue42353@roundup.psfhosted.org>
2022-02-05 02:36:29gregory.p.smith链接issue42353 messages
2022-02-05 02:36:29gregory.p.smith创建