3 ms·
Exactly the same here, re: Perl. My brain thinks in Perl's regex language and then I have to translate the inconsistent bits to the language I'm using. Especia
by ydant 3y ago
Exactly the same here, re: Perl.
My brain thinks in Perl's regex language and then I have to translate the inconsistent bits to the language I'm using. Especially in the shell - I'm way more likely to just drop a perl into the pipeline instead of trying to remember how sed/grep/awk (GNU or BSD?) prefer their regex.
- influx 3y agoGNU grep supports Perl regexp with -P
- mwpmaybe 3y agoAs does git grep!
- 1letterunixname 3y agoUsing PCRE2, which doesn't behave exactly the same as Perl or PCRE1. https://pcre.org/current/doc/html/pcre2compat.html https://pcre.org/current/doc/html/pcre2compat.html https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expres... https://stackoverflow.com/questions/70273084/regex-differences-between-pcre-and-pcre2 https://stackoverflow.com/questions/70273084/regex-differenc...
- mtmk 3y agohah, I'm the same too, straight to 'perl -lne'. I believe that was one of Larry Wall's goals when creating Perl: > Perl is kind of designed to make awk and sed semi-obsolete. https://github.com/Perl/perl5/commit/8d063cd8 https://github.com/Perl/perl5/commit/8d063cd8