Any #regex wizards here?
Is there a way to match multiple linebreaks regardless of the content but only if the number of linebreaks exceeds a value like 5?
#TIL Today I learnt that adding ? after * transforms a #regex expression from being "greedy" into "lazy" (important for performance, safe validators, and protection against DoS attacks).
I don't know how I missed this bit of knowledge for so long. :blobfoxbox:
@castarco I don't see how it protects against DoS attacks. The DoS problem is caused by badly written regexes that take "forever" to fail, so the regex engine is busy trying all possible variations to make the regex match a given string (assuming a standard backtracking implementation).
Making quantifiers non-greedy (by appending ?) does not change the number of ways a regex can match, nor does it shortcut the matching process. It simply changes the order in which alternatives are tried.
In the case of X*, the normal order is to try to match as many X's as possible and only "give back" matches if the rest of the regex fails to match. With X*?, the regex engine will try to match as few repetitions as possible (i.e. 0 at first) and only consume more if the rest of the regex fails to match. In either case all possibilities are tried before giving up.
i have an idea to make computers even worse, let's make it where a file can also be a directory. i mean going beyond the nix "everything is a file" paradigm. i'm saying, /bin/bash is still bash but you can also just store jpegs in /bin/bash/cat_pics
@foone I tried, but Paypal says my credit card cannot be used for making payments, which is bullshit because no other website has an issue with it, including Amazon. (Also, they want my phone number for some reason.) Do you have any other payment channel that doesn't involve Paypal?
@samir Oh, I know this one. Like when you download a custom "image pack" for an HTML game, and the format turns out to be executable JavaScript that registers functions that set .innerHTML of some elements to HTML code with img elements whose src attribute is a data:image/jpeg;base64,... string.
Oh hey, the Attorney General of Indiana has published a snitch line for schools that teach LGBTQ+ issues, or make Woke materials available to their students!
Here’s the URL. Use it responsibly. Don’t use it to report Godzilla flying the Trans flag or anything like that, ok?
I'm disclosing three remote code execution (RCE) 0 days for KiTTY. KiTTY is a fork of PuTTY and has 20 million+ downloads. The vulnerability was introduced in the original release and is stable and reliable on Windows 11-Windows XP. Your sysadmin who likes cats and needs PuTTY is probably using it. The lead developer of KiTTY never replied after multiple contacts (see Timeline).
@defcesco Argh, these are just blatant security holes. There's nothing subtle here.
Let's declare a fixed-size buffer and then write an unchecked/arbitrary amount of data to it! Like char buf[1024]; strcpy(buf, input); - what could possibly go wrong?! #KiTTY
@ethauvin Weird seeing Ruby's name explained without a single mention of Perl. "They knew they wanted to name the programming language after jewels" ... for no particular reason?
Das globale Management von Fortinet hat nun zurückgerudert mit seinem Statement, das an verschiedene internationale Medien gesendet wurde. Dieses auch an CH Media zu schicken, hat die Firma unterlassen. Auch sonst liegt uns bisher kein weiteres Statement von Fortinet vor.
"Fortinet's global management has now backtracked with its statement that was sent to various international media outlets. The company neglected to also send this to CH Media. We have not yet received any further statements from Fortinet."
Abhoring this murder doesn’t make you a partisan of the Rwandan Patriotic Front. It just means you’re a human, opposed to the systematic slaughter of humans.
Wanting this genocide to end with an immediate ceasefire doesn’t mean you support Hamas or want Israel to be destroyed. It means you’re opposed to mass killing and expulsion of people from their homeland.
Is it exactly the same as these other examples? Absolutely not. Genocide never is. But you can be on the side of humanity against the destruction of the people of Gaza and it doesn’t make you an advocate for the views or actions of Hamas.
@Extra_Special_Carbon So far I haven't supported a single thing Hamas does, let alone everything Hamas does. My question was strictly about clarifying what exactly you're trying to say, i.e. the structure of your argument.
If you're unwilling to discuss that, I can just say "oh, so you support genocide" and we're done here.
Wir sind die Brandmauer! In Berlin und anderswo sind auch heute hunderttausende Demokrat*innen auf den Straßen. Wir haben eine Botschaft für die AfD und ihre rechtsextremen Netzwerke: Wir sind die Mehrheit. Wir sind stabil solidarisch. Und wir lassen uns unser Land nicht kaputtmachen.
📷 Fionn Große