home.social

#pcre — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #pcre, aggregated by home.social.

  1. Did you know #Microslop #Excel supports #PCRE?

    I was trying to extract some strings from a cell (written by one of those people who think that Excel is is just "Word with lines") when I thought "ugh, I wish I could just use a #regex."

    Then I noticed this. Unfortunately, the documentation doesn't explain much, so it took some time to figure out their weirdness; no delimiters, no modifiers, etc. That aside, it does support capture groups, so I was able to extract all the values with a single regex.

    Pretty handy!

  2. Oha, #inotifywait kann keine #PCRE (Negatives Lookahead). Wie kann man dann mit -exclude sinnvoll Dateiendungen ausschließen?

    Muss ich jetzt erst einen Converter entwickeln, um die Kernkonstrukte und Negationen auf POSIX abzubilden??

    inotifywait patchen könnte einfacher sein 🤔

  3. @dm

    Always. I kinda wish #PCRE (Perl-Compatible Regular Expressions) were more accepted, because some of those shortcuts (particularly \s) are very space-saving compared to their traditional counterparts ([[:space:]]), but since only GNU grep provides a PCRE option (-P), I avoid using it for the sake of greater compatibility.

  4. @christmastree

    Nice! Good old #PCRE.

    FYI, Mastodon doesn't support markdown formatting or longer posts, but Hometown, GlitchSocial (both forks of Mastodon) and GoToSocial and snac (both independent fediverse server implementations) do. :)

  5. From to powerful in projects and , Philip Hazel’s career is an exciting journey of success and the evolution of ! 🐧

    Dive into Hazel’s story on @LWN and consider carrying on the torch maintaining :

    t.ly/RLY3Q

  6. How free software hijacked Philip Hazel's life [LWN.net]

    Link
    📌 Summary:
    - Philip Hazel 開始開發 Exim 電子郵件傳送代理(MTA)時 51 歲,後來又開始了 PCRE(Perl-Compatible Regular Expressions)專案,到 80 歲時還在維護 PCRE,以及其後續的 PCRE2。
    - Hazel 在成為自由軟體開發者之前已經開始寫代碼,而非在起步時。
    - 在他的技術回憶錄《從穿孔卡片到平面顯示器》中,Hazel 表示他加入了劍橋計算機服務作為軟體開發人員是因為他了解 Manchester Autocode 語言,該語言與 Titan Autocode 相似,他在那裡開始了滑溜的下坡路。
    - Hazel 還開發了 PCRE,為了 Exim 的靈活正則表示式,而不是使用 Smail 中的 Smail MTA。
    - Hazel 在 1995 年 3 月開始工作在 Experimental Internet Mailer(Exim)中,到 11 月時它已經可以發送和接收郵件了。
    - 在與 Richard Stallman 談過後,他將 Exim 的授權從自定義的授權切換到 GPL。
    - Hazel 開發了 PCRE,現在被廣泛用於各種應用和作業系統中。
    - Hazel 正在尋找 PCRE2 的繼任者,他計劃在需要時繼續維護非 PCRE2 的專案,並幫助 PCRE2。

    🎯 Key Points:
    - Hazel 在 1995 年開始 Exim 專案後的 27 年內一直在維護 Exim 和 PCRE。
    - 他在 2007 年退休時將 Exim 的維護交接給他人。
    - 他希望在仍然能夠幫助過渡時交接 PCRE2。

    🔖 Keywords:
    #Hazel, #Exim, #PCRE, #PCRE2, #GNU, #Linux, #Free Software, #Software Development, #Programming

  7. @AnarchoDoggo @silberfuchs @swaggboi #Perl did not “give” the world #PCRE; Philip Hazel wrote it for the #Exim mail transport agent software in 1997.

    I like to refer to it as “*Partially* Compatible Regular Expressions.” Here is the project’s documentation on (some) areas where it will disappoint you: PCRE.org/current/doc/html/pcre

  8. #BSI WID-SEC-2023-1983: [UPDATE] [mittel] #PCRE (#Perl #Compatible #Regular #Expressions): Schwachstelle ermöglicht Denial of Service

    Ein entfernter, anonymer Angreifer kann eine Schwachstelle in PCRE (Perl Compatible Regular Expressions) ausnutzen, um einen Denial of Service Angriff durchzuführen.

    wid.cert-bund.de/portal/wid/se

  9. Has anyone ever made GNU COBOL talk to PCRE, or any other regex library? I feel like I'm close to getting it to work with PCRE, but i'm trying to piece together multiple sets of docs, and I’m still feeling a bit lost. I keep saying, “Hmm. I'm surprised that worked" with each step forward. 🤣

    #COBOL #GNU #regex #pcre

  10. #regex #question

    I was going through some HTML markup/ content where my <h1>,<hx> tags have no anchors/ ID's. pain in the butt to do that manually if i want anchors, It occurred to me: why don't I just process the markup and use the &#x003C;h1&#x003e; (..contents ...) &#x003C;/h1&#x003e;
    but the (...contents...) atom needs filtering. E.g. "this just in", maybe I want "this_just_in"

    That's not really possible w/ #PCRE is it?

    Maybe this is something #sed can do? Im not super fmlr w/ all gnutils

  11. @barubary @Edent Or #PCRE, the Perl Compatible* Regular Expression engine, Which is used by #PHP and #Rlang as well as the #Apache and #nginx HTTP servers, #nmap, #Postfix, and #Exim (for which it was originally written).

    You can even make your #Perl compatible with PCRE instead of other Perl, but you should have a good reason (performance mostly): metacpan.org/pod/re::engine::P

    * PCRE2’s own documentation highlights nineteen separate significant differences: pcre.org/current/doc/html/pcre

  12. @Codely @drupler It helps to build your complicated #RegularExpressions in pieces and store them in separate variables. You can then test them in isolation and not be confused when you concatenate them together for your actual matching.

    Both #PHP and #JavaScript also support named capture groups if you’re doing replacements. They’re a lot more readable.

    Also, PHP’s #PCRE-based engine has a PCRE_EXTENDED flag that lets you add whitespace, newlines, and comments.

    #regexes #regexps

  13. @thfr

    Good to know I don't have to fetch GNU ls ^___^

    But honestly, not missing it. :D

    Is colorls developed by one of the devs, or is it imported from ?

    The only thing I sometimes miss is the . Even vim seems to be missing it, for some reason.
    Oh, and emoji. Emojis work great in Chromium, but almost nowhere else.

  14. I just completed "Tuning Trouble" - Day 6 - Advent of Code 2022 #AdventOfCode in #regex (#pcre #grep) github.com/lucaswiman/advent-o
    adventofcode.com/2022/day/6

    Uses negative lookahead assertions and backreferences to force uniqueness. Then feed it to `grep - Pbo` (P=Perl regexes, b=byte offset, o=only match) to get the position.

  15. @RL_Dane @benjaminhollon @marcxjo #PCRE was “inspired by” #Perl #RegularExpressions. It was developed as a replacement for the original Spencer #regexp library used by the #Exim mail transfer agent. Although there has been some cross-pollination of features, they’re independent projects with different goals.

    #PCRE2 documents some of its differences with Perl here: pcre.org/current/doc/html/pcre

  16. @mjgardner @benjaminhollon @marcxjo

    I wonder where came from, if not from Perl, then?

  17. @RL_Dane
    #PCRE… isn’t. One of these days I’m going to have to catalog the differences between it and the firepower of a fully armed and operational #Perl #regexp battlestation perldoc.perl.org/perlre

    @benjaminhollon @marcxjo

  18. I used professionally, or for real/finished personal projects:

    -
    -
    - (ugh)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    DSLs that matter:

    - ,
    -
    -
    - 😛

    Others I learned or played with, and that I can probably pick up quickly:

    -
    -
    -
    -

    I should probably mention my non-native 🙂

    Primarily, we're language learners 💪