home.social

#regexes — Public Fediverse posts

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

  1. Raku: The match of a regex is automatically stored in $/, and this variable then also provides access to the text before ($/.prematch), to the text after ($/.postmatch), and to the match's position ($/.from and $/.to). Nice.

    docs.raku.org/language/regexes

    #raku #rakulang #regularexpressions #regex #regexes

  2. Raku: The match of a regex is automatically stored in $/, and this variable then also provides access to the text before ($/.prematch), to the text after ($/.postmatch), and to the match's position ($/.from and $/.to). Nice.

    docs.raku.org/language/regexes

    #raku #rakulang #regularexpressions #regex #regexes

  3. Raku: The match of a regex is automatically stored in $/, and this variable then also provides access to the text before ($/.prematch), to the text after ($/.postmatch), and to the match's position ($/.from and $/.to). Nice.

    docs.raku.org/language/regexes

    #raku #rakulang #regularexpressions #regex #regexes

  4. Raku: The match of a regex is automatically stored in $/, and this variable then also provides access to the text before ($/.prematch), to the text after ($/.postmatch), and to the match's position ($/.from and $/.to). Nice.

    docs.raku.org/language/regexes

    #raku #rakulang #regularexpressions #regex #regexes

  5. Raku: The match of a regex is automatically stored in $/, and this variable then also provides access to the text before ($/.prematch), to the text after ($/.postmatch), and to the match's position ($/.from and $/.to). Nice.

    docs.raku.org/language/regexes

    #raku #rakulang #regularexpressions #regex #regexes

  6. Parser combinators in #Haskell are like the cool kids at school 🎓, effortlessly solving Advent of Code problems while #regexes are stuck in detention 🚫. Who knew regexes were still a thing in 2025? 😂 In Haskell, we leave those relics to flounder in the past while we flex our combinator muscles 💪.
    entropicthoughts.com/parser-co #ParserCombinators #AdventOfCode #FutureCoding #Flexibility #HackerNews #ngated

  7. Parser combinators in #Haskell are like the cool kids at school 🎓, effortlessly solving Advent of Code problems while #regexes are stuck in detention 🚫. Who knew regexes were still a thing in 2025? 😂 In Haskell, we leave those relics to flounder in the past while we flex our combinator muscles 💪.
    entropicthoughts.com/parser-co #ParserCombinators #AdventOfCode #FutureCoding #Flexibility #HackerNews #ngated

  8. Parser combinators in #Haskell are like the cool kids at school 🎓, effortlessly solving Advent of Code problems while #regexes are stuck in detention 🚫. Who knew regexes were still a thing in 2025? 😂 In Haskell, we leave those relics to flounder in the past while we flex our combinator muscles 💪.
    entropicthoughts.com/parser-co #ParserCombinators #AdventOfCode #FutureCoding #Flexibility #HackerNews #ngated

  9. Parser combinators in #Haskell are like the cool kids at school 🎓, effortlessly solving Advent of Code problems while #regexes are stuck in detention 🚫. Who knew regexes were still a thing in 2025? 😂 In Haskell, we leave those relics to flounder in the past while we flex our combinator muscles 💪.
    entropicthoughts.com/parser-co #ParserCombinators #AdventOfCode #FutureCoding #Flexibility #HackerNews #ngated

  10. Never before had I considered the importance of "greedy" and "lazy" options for #regular expression matches. By default, regular expression engines try to match the maximum of a chain of characters, but for years I used #regexes not knowing the difference between "x?" and "+?". In one case the question mark says that "x" is optional, in the other, says that searching should stop as soon as a match was found. Clearly explained here and very important:

    stackoverflow.com/questions/23

  11. @sparkman Some people, when confronted with another person solving a problem with #RegularExpressions, think, “I know, I’ll quote @jwz.” Now they feel clever without having to contribute anything.

    #RegExes #programming #coding #SoftwareDevelopment

  12. @mort You can get pretty far with #Perl 5* #RegularExpressions. Here's @perlancar’s #CPAN module based on @randalschwartz’s minimal #JSON parser as a single #regex: metacpan.org/pod/JSON::Decode:

    Full docs on conditional #regexes, including the special `(DEFINE)` form that merlyn used: perldoc.perl.org/perlre#condit

    * #RakuLang hasn't been called #Perl6 for four years now. You're deadnaming the language.

  13. CW: vulgar language

    @vwbusguy @barubary
    @Perl I’m glad mastodon.online/@vwbusguy/1112 works for you, but I feel pity for when you come back to it later.

    It’s nothing to do with #Perl and everything to do with shitty #regex possible in almost any #programming language.

    Though it’s true that Perl’s reputation took a lot of damage from shitty developers filling the world with shitty #regexes in their shitty Perl code. So you’re in a big group, albeit via #Ruby.

  14. Looking at some #regexes for #email, ended up going through the "bang-path" rabbit hole (user1!serv1!serv2!moreservs!someserv!user2) and other ancient stuff, finally finding: textfiles.com/humor/COMPUTER/m

  15. @profoundlynerdy I don’t know anything about #Rakudo’s internals, but Is there any conceivable way for a language-neutral subset of #RakuLang #regexes to be based on or share its code rather than reimplement them?

    The subset might omit things like code interpolation. Or is it all-or-nothing?

    It would be a nice teaser for the full power of Raku grammars, kind of like how #iTunes for Windows was #SteveJobs’ offer of “a glass of water to somebody in hell.” a.co/5J0CTSL

  16. @profoundlynerdy I don’t think other languages *have* “ripped off” #RakuLang #regexes and grammars. The point of a notional “RCRE” library would be to enable that.

  17. Congratulations @siegel and @bbedit for another great feature story on the #Mac #AppStore. "Where Respect Is Due," indeed!

    apps.apple.com/us/story/id1435

    Here are some earlier #BBEdit stories:

    • Why it's the #TextEditor of choice for #coding, #writing, #DataScience, and more: apps.apple.com/us/story/id1433

    • Tips for prose #writers: apps.apple.com/us/story/id1451

    • Learn and experiment with #RegularExpressions for finding and modifying text in your actual work—safely! apps.apple.com/us/story/id1485
    #RegEx #RegExes

  18. @regehr @commodore @dev There is even a (low-severity, a/k/a “cruel”) #PerlCritic policy to discourage everything but $_, @_, $], and numbered #RegularExpression capture variables: metacpan.org/pod/Perl::Critic:

    metacpan.org/pod/Perl::Critic: already protects you against the performance-sapping $`, $&, and $' match variables

    And you can configure your own prohibited list with metacpan.org/pod/Perl::Critic:

    #Perl #RegEx #RegExp #RegExes #RegExps

  19. @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

  20. @sjn @cb 99% of the “#Perl is line noise” complaints are because of unformatted #RegularExpressions. Every language worth anything eventually supports them, but only @Perl (and #awk, earlier) makes them first-class citizens. And with Perl you can format and comment them for readability: perldoc.perl.org/perlretut#Emb

    We format the rest of our code for humans. Why not #regexps?

    #PerlCritic can warn against bad regexps: metacpan.org/search?size=200&q

    #regex #regexes #programming #coding #SoftwareDevelopment

  21. Oh yes! Just what I need before I deliver a training session on #regexes

    #ACDC #PwrUp

  22. One of my goto books for #regexes. This is the Nov '97 edition that I sought out after I read a review that said it was a good edition for #python too. Referring to it right now...

  23. Remember when #programming #humor wasn’t all #memes about “durr #regexes hard,” “hurr can’t exit #vim,” and other admissions of stupidity?