by mmh0000 · 3y ago · 0 comments
The TL;DR is, RegEx behaves slightly differently in each programming language. For example, if and how newlines are matched.
There are three main flavors of RegEx: POSIX, Extended, and PCRE. Most UNIX tools implement either POSIX or Extended. Most Programming languages implement PCRE. Some programs (/cough vim/) just make up their own regex langauge as they go.
[1] https://stackoverflow.com/questions/159118/how-do-i-match-an...
Because the article recommends using a capture group negation to match a character when you know a specific character or set of characters won't be in the group, but doesn't mention why capture groups (and negations) are acceptable to use, while the `.` should be avoided ("because it might have this less predictable behaviour that I'm totally going to avoid talking about with capture group negations")
mmh-hn-trt@xn0.org