|
|
Log in / Subscribe / Register

Development quotes of the week - regular expression edition

Development quotes of the week - regular expression edition

Posted Feb 21, 2022 8:54 UTC (Mon) by tlamp (subscriber, #108540)
In reply to: Development quotes of the week - regular expression edition by flussence
Parent article: Development quotes of the week - regular expression edition

> That's a no-go too because libpcre loudly complains about duplicates and errors out.

ripgrep doesn't use libpcre, but the native rust regex crate[0] which is inspired by Google's re2 and has similar pro/cons that NYKevin mentioned above w.r.t. re2.

Maybe it could be worth opening an issue at ripgrep regarding this behavior, but IMO it's a bit odd to use grep/rg/ag/... for this, awk (and derivates, like frawk[1]) sounds like it could be a better option. I use awk quite successfully for searching nginx access logs for unusual patterns.

[0]: https://github.com/rust-lang/regex
[1]: https://github.com/ezrosent/frawk


to post comments

Development quotes of the week - regular expression edition

Posted Feb 26, 2022 3:02 UTC (Sat) by flussence (guest, #85566) [Link]

> ripgrep doesn't use libpcre, but the native rust regex crate

It uses both, see `ldd`. I was using the --pcre2 flag because there were lookbehinds in a few of the patterns.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds