3 ms·
> PCRE is hardly used "everywhere". The topic under discussion was extensions that make regex non-regular (as popularised by Perl and libpcre), not PCRE per se
by bmn__ 6y ago
> PCRE is hardly used "everywhere".
The topic under discussion was extensions that make regex non-regular (as popularised by Perl and libpcre), not PCRE per se. Per this site's rules, I assume good faith and that you simply misunderstood me and did not deliberately put up and topple this straw-man.
Adoption of non-regular extensions is overwhelmingly larger than adoption of the opposite.
1. These non-regular extensions can be found in Java/Kotlin/Scala/etc., Javascript, Perl, PHP, Python, Ruby, C#, R, Swift, Matlab, Julia, Haxe, Ocaml and literally dozens of other languages on various popularity charts, and as a first pick option in C, C++ and Lua. Go and Rust are the exemptions to the rule! There are millions of pieces of software written using these which one can't even see because they are not public.
2. Programmers and end users want features and power much more than they want determinism. (Performance is a red herring because the vast majority of the time, performance is good enough, or even identical to non-extended.) That's why ripgrep and GNU grep and rspamd have them.
https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#how-do-i-use-lookaround-andor-backreferences https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#how...
https://www.gnu.org/software/grep/manual/html_node/Regular-Expressions.html https://www.gnu.org/software/grep/manual/html_node/Regular-E...
https://rspamd.com/announce/2016/03/21/rspamd-1.2.0.html https://rspamd.com/announce/2016/03/21/rspamd-1.2.0.html
3. A factual survey where libraries are used. This will be invisible for the aforementioned programming languages because they have built-in regex, but simply libpcre alone versus re2 and libhs shows clearly which paradigm is dominant and which is a niche.
libpcre: ag, apache2, blender, clamav, cppcheck, exim, fish, git, gnome-builder, godot, grep, haproxy, kodi, libvte, lighttpd, lldb, mariadb, mongodb, mutt/neomutt, mysql-workbench, nginx, nmap, pam, postfix, Qt5/Qt6, rspamd, selinux, sway, swig, syslog-ng, systemd, uwsgi, uwsgi, varnish, vlc, wget, zsh … … … and 110 more.
re2: bloaty, chromium/chromedriver/qtwebengine, clickhouse, libgrpc
libhs: libndpi, rspamd