Conversation this week:

Them: "How did you learn about regex? Javascript? Python?"
Me: "sed"
Them: "Oh I've not heard of that. Is that new?"
Me: <laughed in greybeard>

Unbekannter Ursprungsbeitrag

friendica (DFRN) - Link zum Originalbeitrag

Martijn Vos

@Andre Geißler @Preston von Gabbleduck

Perl regexes aren't true regexes, though. They're more powerful than that.

I forgot the details of how they're different 20 years ago and I have no idea whether any other regexe systems aren't really regexes.

I learned mine in vi, which are regular as far as I know.

Unbekannter Ursprungsbeitrag

friendica (DFRN) - Link zum Originalbeitrag

Martijn Vos

@Andre Geißler @Preston von Gabbleduck

A regular expression is the first level in the Chomsky hierarchy of formal grammars, below context free and context sensitive languages.

en.m.wikipedia.org/wiki/Chomsk…

I think Perl was the first to make its regexes more powerful than that, but according to en.m.wikipedia.org/wiki/Regula… it's not the only one anymore, which makes sense. Who doesn't want more power?

Unbekannter Ursprungsbeitrag

mastodon - Link zum Originalbeitrag

Brar Piening

@rdfhrn When I started exploring the WWW because it was fresh and new and looked more interesting than the BBS that were still around back then, Perl/CGI was how you'd do serious programming (DHTML/Javascript existed but were more of a toy you used to make something blink or appear before AJAX became a thing). I still love regex from that time and have to be careful to not overuse it when collaborating with others.
Unbekannter Ursprungsbeitrag

mastodon - Link zum Originalbeitrag

d.rift

@rdfhrn @mcv "more powerful" is doing a confusing lift here because outside the computational complexity community it may be unclear that this is an uncomfortable property, whereas "regular" is quite a relief to see as it ensures a lack of the edge cases of doom for which perl "regex" (I fall in the mathematical camp, that it can only be a regular expression if it is both an expression and regular) were widely known.