Weekend reading for code obsessives, based on my current work adding semi-full regular expressions to Quamina. Two blog entries, coding recommendation, and a quiz/challenge.
1. QRS: Quamina Regexp Series - https://www.tbray.org/ongoing/When/202x/2024/12/12/Quamina-Regular-Expression-Series
2. QRS: Parsing Regular Experssions - https://www.tbray.org/ongoing/When/202x/2024/12/12/QRS-Parsing-Regular-Expressions
[If you don’t know what a “regular expression is”, please ignore this, and don’t feel bad, because nobody should have to know that.]
I already knew of this #regex that tests for #PrimeNumbers but in case you haven’t, then you’re one of the lucky (#xkcd) 10000!
I just finished another war against RegEx... Anyone else know the feeling?
#regex #infosec #development #programming #RegularExpressions
(Updated picture to make it say O RLY)
On .NET | Deep Dive into RegEx with Stephen Toub & Scott Hanselman.
#dotnet #regularexpressions #regex #programming
https://www.youtube.com/watch?v=ptKjWPC7pqw&ab_channel=dotnet
@trochee
It's gratifying to see you making fun of stuff I never got around to learning.
#RegularExpressions #Perl
Developers: how do you personally pronounce "regex"?
* Rej-ex ("Rej" as in "register")?
* Reg-ex ("Reg" as in "regular")?
* Something different? - share in the comments!
Any #RakuLang core hackers want to take up this challenge?
#RegularExpressions #RegExps #RegExes #RegEx https://ruby.social/@gd/110718818730295923
@smonff @Perl Y’all know I’m the first to crow about unique #Perl features, but #RegularExpressions’ syntax of ^ for the start of a line or string and $ for the end dates back at least to #Unix co-author Ken Thompson’s rewrite of the `qed` text editor for the #CTSS operating system on the IBM 7090 #mainframe at #BellLabs around 1970. (Perl creator Larry Wall was a teenager at the time.)
A useful little site for testing the equivalence of two regular expressions:
https://bakkot.github.io/dfa-lib/regeq.html
(Source code: https://github.com/bakkot/dfa-lib)
PS. Speaking of regular expressions, I’m sure you‘re all familiar with RegExr so I’m not even mentioning that… Well, I guess I am ;) https://regexr.com/
@jens @stoerdebegga Most #Perl readability complaints are actually about #RegularExpressions, which every other worthwhile language has as well. Perl’s #regexp support happens to be first-class, and consequently, It has the best tools for regexp readability.
If you see Perl that does not use those tools, that is a failure of the programmer and not the language.
@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: https://perldoc.perl.org/perlretut#Embedding-comments-and-modifiers-in-a-regular-expression
We format the rest of our code for humans. Why not #regexps?
#PerlCritic can warn against bad regexps: https://metacpan.org/search?size=200&q=module%3APerl%3A%3ACritic%3A%3APolicy%3A%3ARegularExpressions
@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: https://www.pcre.org/current/doc/html/pcre2compat.html
#RegularExpressions #JavaScript:
Putting a question mark after a quantifier such as {1,3} or * or + makes that quantifier _reluctant_—it matches as little as possible:
> /^(#{1,3}?)(#*)$/.exec('####').slice(1,3)
[ '#', '###' ]
> /^(#{1,3})(#*)$/.exec('####').slice(1,3)
[ '###', '#' ]
https://exploringjs.com/impatient-js/ch_regexps.html#quantifiers
ECMAScript proposal: RegExp flag `/v` makes character classes and character class escapes more powerful
https://2ality.com/2022/11/regexp-v-flag.html
#EsNextNews #EcmaScript #JavaScript #RegularExpressions
Habe gerade rausgefunden, wie man die remote_follow-URL mit RegEx findet.
Super nützlich, wenn man #neuhier wie ich ist und eine Passwortmanager mit Unterstützung für "Reguläre Ausdrücke" aka #regularexpressions (RegEx) hat, um die URL zu prüfen.
Remote-Follow Domain: https://SUBDOMAIN.TLD/users/NUTZERNAME/remote_follow
#RegEx für die Domain:
^https:\/\/\S+\/users\/\S+\/remote_follow$
P.S. Mir hat https://regexone.com geholfen.