4 ms·
Some of them are baffling. regex - Don't use. Instead, use regular expression
by omega3 5y ago
Some of them are baffling.
regex - Don't use. Instead, use regular expression
- BlueParanoia 5y agoThis is a style guide, not a word blacklist. They suggest not using regex because it's not as clear, especially to thought who never learned what regex is, as regular expression.
- josteink 5y ago> This is a style guide, not a word blacklist. You're not allowed to say that :D
- omega3 5y agoI think the reverse is actually true, more people know what regex is than what it stands for (especially if their first language isn't English). https://trends.google.com/trends/explore?geo=US&q=regex,regular%20expressions https://trends.google.com/trends/explore?geo=US&q=regex,regu...
- kevincox 5y agoExactly. Some acronyms are more commonly known than their "expanded" form making the former the better name to use. For example I don't see many people spelling out Hyper-Text Transport Protocol.
- blackshaw 5y agoHow could anyone with more than 5 minutes experience as a software developer possibly not know what a "regex" is?
- nickysielicki 5y agoThis is further complicated by the fact that “regular expression” typically refers to the more academic form of regular expressions (eg: regular languages), whereas “regex” tends to refer to the extended PCRE-style regexs with various non-regular features.
- pseudalopex 5y agoThey're synonyms typically. Put both in a search engine if you don't think so. PCRE even stands for Perl compatible regular expressions.
- nickysielicki 5y agoI’m not at all the first person to make a distinction between “regex” and “regular expression”. (First result on google for “regex vs regular expression”) https://www.rexegg.com/regex-vs-regular-expression.html https://www.rexegg.com/regex-vs-regular-expression.html > Perl had a huge influence on the flavors of regular expressions used in most modern engines today. This is why modern regular expressions are often called Perl-style. The differences in features across regex engines are considerable, so in my view speaking of Perl-style regular expressions only makes sense when one wants to make it clear one is not talking about the ivory tower brand of mathematically-correct expressions. > But if you really want to avoid ambiguity, just say regex, as that is one word that white-coat computer scientists are not claiming.
- pseudalopex 5y agoNo one said you were the first. And obviously adding vs changes the results. Your own source says "This is why a small minority of people today (most of whom have email addresses ending with .edu) will maintain that what we call regex are not regular expressions. For the rest of us… Regex and regular expressions? Same-same."
- nickysielicki 5y ago... uh, right. Which is what I said in my top comment in this thread... Which you replied to, and called me out for having made a distinction where you thought one didn’t exist. Huh?
- pseudalopex 5y agoYou said typical usage distinguishes between regular expression and regex. Your source says it doesn't.