juandesant, to random
@juandesant@astrodon.social avatar

I tend to follow the logic of awk better than the one of sed (not being a vi enthusiast), but it is good to see when one might be better than the other:

https://www.linuxjournal.com/content/text-manipulation-linux-awk-vs-sed

neustradamus, to random
@neustradamus@mastodon.social avatar
mjgardner,
@mjgardner@social.sdf.org avatar

@neustradamus continues to be a misnomer; it’s a modified subset of 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

youronlyone, to RegEx
@youronlyone@c.im avatar

To my fellow who are also into programming. Can you handle / ?

Up to how much complexity?

When I was younger, it was easy. Today, I have to use a test tool! ^_^;;

@autistics @actuallyautistic

mdione, to random
@mdione@en.osm.town avatar

@cheeaun again me with #phanpy questions. when you find a toot like this one and like this other one:

https://fosstodon.org/@bignose/111775074307968376

do you do anything in particular when:

a) showing the toot in the timeline; and
b) when showing the toot's context on the right?

I have the impression that you somehow figure out it's another toot and do things differently to any other type of link. How do you figure that out?

mdione,
@mdione@en.osm.town avatar

@cheeaun I guess the #regexp is something like https://(domain)/@(username)/(toot_id). Do you remember where in/can you point me to your code that does this?

stbc, to webdev German
@stbc@nrw.social avatar

Diese WebDevs, deren Formular auf der Webseite des Online-Shops .email als TLD nicht anerkennen und eine gültige Mailadresse wollen: Weiß man da schon genaueres oder ist denen Umsatz einfach egal?

#Validation #RegExp #webdev

mjgardner, to Perl
@mjgardner@social.sdf.org avatar

has supported pluggable replacements for its engine since the release of v5.10 in 2007: https://perldoc.perl.org/perlreapi

An @ietf compliant I- subset would be very helpful for @Perl implementing specifications like the draft standard: https://datatracker.ietf.org/doc/draft-ietf-jsonpath-base/

(There is already a JSONPath module: https://metacpan.org/pod/JSON::Path) https://cosocial.ca/@timbray/110714888717469041

regehr, to random
@regehr@mastodon.social avatar

students are getting a bit harsh lately

MadMike77,
@MadMike77@chaos.social avatar

@regehr a good friend of mine had to maintain some #perl scripts. He calls them "write-only".
I have a growing list of #regexp and #sql select queries, which need sub- and sub-sub-queries (and so on). Those really make sense when I write them, but are hard to figure out after a week working on different code.

mjgardner,
@mjgardner@social.sdf.org avatar

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

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

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

#Perl #RegEx #RegExp #RegExes #RegExps

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • thenastyranch
  • Durango
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • osvaldo12
  • GTA5RPClips
  • kavyap
  • megavids
  • InstantRegret
  • everett
  • tacticalgear
  • vwfavf
  • tester
  • normalnudes
  • modclub
  • ethstaker
  • khanakhh
  • cisconetworking
  • anitta
  • Leos
  • JUstTest
  • All magazines