4 ms·
You must not have suffered enough, I mean used regexs widely enough. He meant “syntax” in the sense that different regex engines have different syntax and capa
by pstoll 5y ago
You must not have suffered enough, I mean used regexs widely enough.
He meant “syntax” in the sense that different regex engines have different syntax and capabilities - can I do a negative look ahead assertion in engines Z, how do I do a zero width lookaround in pcre, gnu, python, posix, etc.
Depending how far down the rabbit hole you want to go, start here:
https://swtch.com/~rsc/regexp/regexp1.html https://swtch.com/~rsc/regexp/regexp1.html
- midjji 5y agoOh and dont forget that just because the documentation says it uses a specific regex syntax, that does not mean its correctly implemented. It gets worse when an application examples specify a specific syntax but what happens in the background is that it will use the default reg exp engine, which can be system or enviroment specified.
- metalliqaz 5y agoI just don't count those cases as 'basic' syntax.
- pstoll 5y agoBasic - naming a capture group. Awk / posix - \1 Perl - $1. Python - (?P<name>). I’d find it hard to ignore the specifics. I mean if you only ever use one tool and were never exposed to other regex engines I guess.