➜

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.

Author gregory.p.smith
Recipients ezio.melotti, gregory.p.smith, matthew.suozzo, mrabarnett, serhiy.storchaka
Date 2022-02-05.02:36:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
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/
History
Date User Action Args
2022-02-05 02:36:29gregory.p.smithsetrecipients: + gregory.p.smith, ezio.melotti, mrabarnett, serhiy.storchaka, matthew.suozzo
2022-02-05 02:36:29gregory.p.smithsetmessageid: <[email protected]>
2022-02-05 02:36:29gregory.p.smithlinkissue42353 messages
2022-02-05 02:36:29gregory.p.smithcreate