- cross-posted to:
- programmer_humor@programming.dev
- cross-posted to:
- programmer_humor@programming.dev
That third one is also sad
Must be bad at regular expressions. I generally get far more than one extra problem when using them.
No, you see, the RG was to solve the problems
Solve the problem of not having enough problems? 🤔
The past tense of regex is regrets.
I never understood why are people scared of regular expressions. I love them and they can be quite usefull.
Here is an example of one regex I wrote recently - it is used in replace:
(?:^-\[[^[]+\]$| ?\[.+?\] ?)Must be irony
I could use a use case. RegEx are pretty “what does it mean” without what it’s targeted on.
I have mentioned it in the comments below, but to explain it simply, I just wanted to remove all the bracketed text + a dash if there is no other text.
I started using regex because i need to rename a lot of my pirated media from “this_episode_uploaded_byXxXSuperEl33tSqwaaadXxX_MLP_s04_Episode7_bats.mkv”
and linux deals with it very nicely. Much better than manual, anyways
Why waste time doing any matching if wantarray == false? Just do:
if(!wantarray) { return 1; }Before any matching happens, or if you only want one return statement set the value of a variable in if(!wantarray)/elsif(regex) and return that variable at the end.
Im predicting AI. Alternatively random screenshot from Google, which is probably AI.
Top notch shitpost. Extra credit for perl!
What the hell kind of disgusting language is that? I need to know so I can avoid it at all costs.
The post is written in English 😔
Not sure if joking, but that looks like Perl.
I haven’t used it in like 20 years. There is a way to write it so that it’s not insane. You can write it kind of like C. But no one does that. So you end up looking at this crap.
It’s been referred to as a “write-only” language, as it’s not readable.
I know the reference from my perl days but I beg to differ. I wrote well-structured perl code with plenty of comments. I like to believe those projects of mine could be useful to someone else.
https://en.wikipedia.org/wiki/Regular_expression
You can use it in any language.
Practice safe hex as they say…
fucking perl! Loved it…
Panting can also be a sign of stress with dogs