@manwar The last one in your examples is wrong, it ends at (2,2), so the answer is false...

Anyway, after the nice cup of coffee in my Monday morning, I got to the following #RakuLang #OneLiners -- the first making good use of Raku's nice #RegEx #RegExen #RegExes and the second, of the Bag type...

Power String: ```
m:g/(.)[$0*]/.list».Str».chars.max
```
Meeting Point : ```
.comb.Bag.&{.<L> == .<R> && .<U> == .<D>}
```

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.

https://docs.raku.org/language/regexes#Literals_and_metacharacters

#raku #rakulang #regularexpressions #regex #regexes

Regexes | Raku Documentation

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 💪.
https://entropicthoughts.com/parser-combinators-beat-regexes #ParserCombinators #AdventOfCode #FutureCoding #Flexibility #HackerNews #ngated
Parser Combinators Beat Regexes

Parser Combinators Beat Regexes

At a past position, the team I was on had a #regex that was several kilobytes in length in several products. It was the stuff of nightmares!   We only managed by splitting their definition strings into multiple pieces that were assembled kind of like a puzzle.  

That said, it was also an amazing learning experience and taught me about things to be extremely careful about, like don’t go too deep with the nesting of groups, and definitely don’t sprinkle deeply nested groups with the Kleene star or anything else that is unbound in length or repetition.   

(I still love #RegularExpressions for their power, though.  )

#RegularExpression #regexes #work

KBBS

Bad Apple but it's 6,500 regexes that I search for in vim · eieio.games

There's no reason I should exit vim just to watch a video

eieio.games

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:

https://stackoverflow.com/questions/2301285/what-do-lazy-and-greedy-mean-in-the-context-of-regular-expressions

What do 'lazy' and 'greedy' mean in the context of regular expressions?

What are these two terms in an understandable way?

Stack Overflow

@neustradamus #PCRE continues to be a misnomer; it’s a modified subset of #Perl #RegularExpressions with dozens of differences: https://pcre.org/current/doc/html/pcre2compat.html

It's not "(C)ompatible." Accept no substitutes: https://perldoc.perl.org/perlre

#PCRE2 #PerlIncompatibleRegularExpressions #RegularExpression #RegExes #RegExps #regex #regexp

pcre2compat specification

@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

@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: https://metacpan.org/pod/JSON::Decode::Regexp

Full docs on conditional #regexes, including the special `(DEFINE)` form that merlyn used: https://perldoc.perl.org/perlre#condition-yes-pattern-no-pattern

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

JSON::Decode::Regexp - JSON parser as a single Perl Regex - metacpan.org

JSON parser as a single Perl Regex