No video

Destroyed By A Regex

  Рет қаралды 93,239

ThePrimeTime

ThePrimeTime

Күн бұрын

Recorded live on twitch, GET IN
/ theprimeagen
Become a backend engineer. Its my favorite site
boot.dev/?prom...
This is also the best way to support me is to support yourself becoming a better backend engineer.
Blog article: osintteam.blog...
By: Aditya Armal
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Kinesis Advantage 360: bit.ly/Prime-K...
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/dee...

Пікірлер: 428
@DMSBrian24
@DMSBrian24 6 ай бұрын
>junior asks chatGPT for parsing a string and blindly copies a 2 line-long regex >"damn this junior seems to know his shit, i have to act like i understand it" >"LGTM"
@anonymousanon4822
@anonymousanon4822 6 ай бұрын
Jokes aside, the one thing that really impresses me about ChatGPt when it comes to coding are its RegEx capabilities. I once needed a Lua Pattern (less capable version of RegEx without assertions or repeating words) to extract quoted parts from a string with the limitation that escaped quotes need to be ignored. It came up with a three step process where it first replaces every instance of escaped quotes in the string, then extracts the actual quoted substrings and then restores the original formating by rereplacing the temporary placeholder with escaped quotes again. I thought surely there must be a simpler way. I spent 2 hours reading the docs and fiddling around with it and only came up with uglier, slower solutions. That was the first time I felt that I could've really saved time using ChatGPT without sacrificing code quality.
@darrenzou2483
@darrenzou2483 6 ай бұрын
why my aws bill 1.4m
@_Lumiere_
@_Lumiere_ 6 ай бұрын
ZAMN unintelligible regex 😍
@lewesc
@lewesc 6 ай бұрын
Insanely plausible
@nosam1998
@nosam1998 6 ай бұрын
Was literally gonna comment this LOL! I truly think that's what happened too.
@colinmaharaj
@colinmaharaj 6 ай бұрын
You trying to say catastrophic consequences ended up as a catastrophic consequence
@webbugt
@webbugt 6 ай бұрын
You could write a regex for that
@stacklysm
@stacklysm 6 ай бұрын
My brain almost didn't parse this comment
@Niohimself
@Niohimself 6 ай бұрын
@@stacklysm must be an LL(1) comment
@SianaGearz
@SianaGearz 6 ай бұрын
A sequence of catastrophic consequences.
@PakRoc-dev
@PakRoc-dev 6 ай бұрын
it's a recursive catastrophe
@leob3447
@leob3447 6 ай бұрын
"I fumbled the bag harder than Netflix did with Witcher" 40 seconds in and you get a slow clap and a like!
@davidspagnolo4870
@davidspagnolo4870 6 ай бұрын
Is he allowed to say that? lol
@Zuttoh
@Zuttoh 6 ай бұрын
I've written so much regexes in my lifetime.... that my brain has started liking them. Also, protip to anyone who's tasked into writing a monstrous regex that looks like it could destroy the whole universe, time travel back in time, and destroy it again... Just split the regex into multiple different regex calls, you'll thank yourself next time you need to work on it.
@asagiai4965
@asagiai4965 2 ай бұрын
That is quite true, sometimes you have to split and simplify.
@-slasht
@-slasht 6 ай бұрын
Regex is the Bear Grylls survival skill of the tech world. It allows you to do things that most people consider impossible, occasionally it is gross and undignified, and should you find yourself in a situation calling for its use, several things have gone very wrong already.
@0xCAFEF00D
@0xCAFEF00D 6 ай бұрын
I'd recommend Kevin fangs video on this over any blog I've seen. It was excellent. Humorous, well illustrated and explained. Just what I wanted. Excellent channel. Perhaps in poor style to throw this under prime but I just can't recommend it enough. Hoped he was reacting to that video.
@andrewcathcart
@andrewcathcart 6 ай бұрын
I mean if you actually watched this video you will see that he starts watching Kevin Fang's video around 11 minutes in.
@not_a_cool_handle
@not_a_cool_handle 6 ай бұрын
kevin fangs deez nutz
@0xCAFEF00D
@0xCAFEF00D 6 ай бұрын
@@andrewcathcart You're right he watches some of it. I wasn't going to rewatch something I know.
@LordFokas
@LordFokas 6 ай бұрын
The end was so dramatic he forgot to say "the name: is don't use regex ... --agen!!"
@NMiller_
@NMiller_ 6 ай бұрын
Regex is the language of the ancients. It's complexities are beyond mortal minds. When the titans' vacuum tubes were not yet cold, regex was old, and the new gods in Redmond and Los Altos had not yet opened their newborn eyes.
@ktxed
@ktxed 6 ай бұрын
Shit straight from Los Alamos pencil and paper days
@chupasaurus
@chupasaurus 6 ай бұрын
A decade after Ken Thompson unleashed this unholy language into Unix, the e-mail server was born and it speaks only it's own Turing-complete version of regex. Sendmail will drive anyone into madness on the first meet, beware!
@thewiirocks
@thewiirocks 6 ай бұрын
They also warned us: "Many a young programmer with a problem thinks, 'I know! I'll use a RegEx!' Now he has two problems." -JWZ
@alexanderjordan2506
@alexanderjordan2506 6 ай бұрын
contains() is nice, but that assumes you're allowed to take input and run it against custom code. Many firewall applications allow you to only enter a pattern to match.
@JohnDoe-yx4hi
@JohnDoe-yx4hi 6 ай бұрын
True, and using `contains()` wouldn't solve the problem anyway; the regex was much more involved than just `/=/`. People really must be regex-blind if they can't see that...
@jelliott3604
@jelliott3604 6 ай бұрын
Ah regex, the way to turn any well defined and understood problem into a set of complex intertwined issues that make your head hurt
@JDSchmelzerful
@JDSchmelzerful 6 ай бұрын
Flip has never removed one of these Prime. Good job Flip
@daves.software
@daves.software 6 ай бұрын
They were using a back-tracking regex matcher, instead of a DFA-based regex matcher. So yes, it was looping re-matching over and over and over.
@xtieburn
@xtieburn 6 ай бұрын
One of the few times Ive seen some use a high number for increasing importance was while I worked as a shelf stacker in a big store, and over the speakers hear someone in a noticeably panicky voice call out: 'Service call one million. Thats a service call _one million_ ' before managers started sprinting round the store. I still dont actually know if thats an official service call or they just picked a crazy number to get the attention of everyone required, but in case you are interested that meant the entire store system was down. No stock taking, no staff systems, no functioning tills, almost everything was offline. It was a lot of chaotic fun that day. (They got some basic payment procedures up first thing, but without anything else the procedure was to look at shoppers goods, _massively_ underestimate the price and charge that. Everything was down long enough that customers were coming back around and trying to hide expensive items under cheap ones to get even better deals.)
@ssjarchon
@ssjarchon 6 ай бұрын
Regex is fine and a great tool when used for the right job. The problem is that some people try to solve problems that truly need a parser with Regex, or that they don't understand what they are doing at all with it. I recommend creating test suites for your regexes if they are somewhat complex, and the longer they get, consider breaking the problem up. I use regex for doing things like parsing css values, applying automatic formatting to text, or other little tasks all the time.
@SianaGearz
@SianaGearz 6 ай бұрын
Funny how regex is basically the standard way of doing lexer step in a parser.
@theodorealenas3171
@theodorealenas3171 6 ай бұрын
There are 2 cases where I've used regex: in-place text substitution and a personal long shell script that parses itself. I don't dare run regex while I sleep. Regex always execute in front of me.
@CottidaeSEA
@CottidaeSEA 6 ай бұрын
I think the main problem here is that the person didn't understand the consequences of using .* and trying to match a character after that. To achieve the desired result, a negated set would've been perfect for the job. The problem is the readability.
@marcoceriani1069
@marcoceriani1069 6 ай бұрын
@@theodorealenas3171 I've seen a thread in production that has spent more than a day running a very simple regex on an unexpectedly large input. The regex has then been replaced with a string contains and some change in the code. If it's not running in front of me, at least I must be confident that it's always run on text limited in length
@isodoubIet
@isodoubIet 6 ай бұрын
@@CottidaeSEA I think the main problem is really that the person used a regex matching algorithm written by colossally incompetent fools. The entire _reason_ to use regular expression grammars is they're parseable by DFA, that's literally the whole point. Why on _earth_ is it backtracking?
@FizzlNet
@FizzlNet 6 ай бұрын
RegExp in a code review: "LGTM!" I'm sure he knows what he is doing, if he can write a regexp that complicated...
@DMSBrian24
@DMSBrian24 6 ай бұрын
exactly this
@thom1218
@thom1218 6 ай бұрын
The hate for regex is just skill issues being projected. The number of ef'd up substring index arithmetic I see devs fumbling around with to do the simplest pattern extraction is hilarious, and almost always leads to some index out of bounds or NPE error on an input string they didn't consider or unit test.
@asagiai4965
@asagiai4965 2 ай бұрын
To be fair a lot of people gonna have skill issues with regex. Especially since most don't know what they are doing.
@emilemil1
@emilemil1 6 ай бұрын
Usually what you want to do is split up the string first and then use simpler regexes on the individual parts. If you need more than one .* then you're probably doing something wrong. .*(?:.*=.*) is obviously written by someone who doesn't understand what they are doing. The first .* within the non-capturing group is never going to match anything since the .* before the non-capturing group is going to greedily match all characters before the equals sign. So it's effectively the same as writing .*(?:=.*), except with exponentially worse performance. The performant version would be (.*?=.*).
@ruroruro
@ruroruro 6 ай бұрын
Or [^=]*(?:=.*) if you don't have non-greedy/minimal/lazy quantifiers.
@soniablanche5672
@soniablanche5672 6 ай бұрын
non capture group means it's a group that will not be added to the results. Sometimes you want to group an expression but don't actually care about capturing their values, so you wrap it in (?: ).
@gregorymorse8423
@gregorymorse8423 6 ай бұрын
It won't be added to the capture groups but it can still be part of the outer match
@XDarkGreyX
@XDarkGreyX 6 ай бұрын
I started doing [^x]* in those cases ages ago, and I am a junior. Aside from not using regex, there are probably even more enlightened ways to solving that, but you do you CF...
@thekwoka4707
@thekwoka4707 6 ай бұрын
How is that better? Oh so like [^=]*= got it
@gokk99
@gokk99 6 ай бұрын
even better, make it a possessive quantifier: [^=]*+=
@steffahn
@steffahn 6 ай бұрын
really, all you need is a properly implemented and optimized regex engine. It's not exactly cutting edge, finite automata theory is about 70 years old. Of course when computers are "fast enough" and neither the one implementing the regex engine nor the one using it cares to fully optimize their shit, desaster entails.
@Burgo361
@Burgo361 6 ай бұрын
I used regex's in my final project at uni it only took a week to work out that I should just write a function the function took a few minutes but I learned something from all of that.
@asagiai4965
@asagiai4965 2 ай бұрын
Yeah you don't always need regex
@Burgo361
@Burgo361 2 ай бұрын
@@asagiai4965 That and how easy it is to create intermittent bugs that slip through testing.
@chickenduckhappy
@chickenduckhappy 6 ай бұрын
Seven String.contains approx. seven times slower than one regex with seven alternative strings bc regex is compiled to a DFA.
@vytah
@vytah 6 ай бұрын
Only if you use a DFA-based regex implementation, which CloudFlare before the outage didn't. Also, contains, especially when looking for a single character, is much faster than any DFA, as it can use SIMD.
@robgrainger5314
@robgrainger5314 6 ай бұрын
If this had been compiled to a DFA there would have been no issue - it would have been deterministic, so not needed any backtracking.
@chepossofare
@chepossofare 6 ай бұрын
I'd rather do it slower but reliable.
@robgrainger5314
@robgrainger5314 6 ай бұрын
@@chepossofare In this case, its both slower and less reliable - which I can't imagine anyone favouring.
@JohnDoe-yx4hi
@JohnDoe-yx4hi 6 ай бұрын
@@vytah Do you think that their regex was only looking for a single character?
@Yotanido
@Yotanido 6 ай бұрын
A single .* is not even the problem. That takes linear time - it's not a big issue. The double .*.* is the problem, since it can't know which of the .* matches which part of the string, so it has to potentially try all possible combinations. Of course, don't use a regex to check if a string contains = lol
@JohnDoe-yx4hi
@JohnDoe-yx4hi 6 ай бұрын
Yes, and the regex in question did more than just checking whether a string contains "=". Prime's reaction... this comment... I expected better. Sad!
@airkami
@airkami 3 ай бұрын
The words “use contains equals” is not the same phrase as “this regex was only checking for an equal sign” You have wrongly concluded that Prime meant the latter when he said the former, but you have failed to realize there is a better explanation for why Prime said “use contains equals” This better explanation appears more than once in the video. First, it appears before he says “use contains equals” you can hear him say “use contains” more than once while highlighting different parts of the text that talk about different parts of what the refer does. That’s because you can write a “contains” line for each part of the reflex statement that is checking to see if the string contains many different things and get the same result as using the regex. Later, we see a diagram of what was being matched in the regex. Again, Prime highlights the individual elements that are listed and says you can “use contains” for each thing being checked for besides the equal sign. Does you understand what I’m talking about here?
@CottidaeSEA
@CottidaeSEA 6 ай бұрын
I recently added a regex to validate locale strings. It became uglier than I expected, but it was also simpler than I thought. Most important of all, it's not going to break shit. I do kind of wish I had just split the string into two parts and validated each part individually though.
@reed6514
@reed6514 6 ай бұрын
I love regex, but yeah if you can split the string on a known delimeter, i find that is usually easier to work with.
@specterent
@specterent 6 ай бұрын
Just loved the ending..."AIs were trained off stack overflow, stack overflow uses regex to solve everything. Oh no!"
@ea_naseer
@ea_naseer 6 ай бұрын
Regex exits Me: Oh finite automata...
@0xCAFEF00D
@0xCAFEF00D 6 ай бұрын
NFA specifically I think. If this is the cloud flare issue I'm thinking of.
@pianissimo7121
@pianissimo7121 6 ай бұрын
As someone who learnt Finite Automata just weeks ago, this is the 1st thing that came to mind.
@LtdJorge
@LtdJorge 6 ай бұрын
@@0xCAFEF00D Yep, NFA. Although I’m pretty sure it can be turned into DFA.
@atijohn8135
@atijohn8135 6 ай бұрын
@@0xCAFEF00D nfas would be more or less fine in this situation (they have linear complexity), the regexp engine they used did *not* use an automaton, but a simple recursive backtracking algorithm (i.e. for Kleene stars consume as much characters as possible, then match one less on each failure, for alternatives just try them left to right until they succeed; this has exponential complexity for obvious reasons)
@VivekYadav-ds8oz
@VivekYadav-ds8oz 6 ай бұрын
@@atijohn8135 NFAs use backtracking and have exponential complexity. If you first convert it to DFAs though then it's fine.
@TymurDaudov_aka_tymfear
@TymurDaudov_aka_tymfear 6 ай бұрын
We had a saying in one of the teams - "if you solve your problem with regex - now you have 2 problems"
@another212shadow
@another212shadow 6 ай бұрын
That's JWZ's quote that is at least 15 years old:.
@TymurDaudov_aka_tymfear
@TymurDaudov_aka_tymfear 6 ай бұрын
@@another212shadow didn’t say we invented it, just that we had it. Btw, have no idea who JWZ is, sorry
@another212shadow
@another212shadow 6 ай бұрын
Jamie Zawinski It was his .sig file and he says he took it off of an older sed joke. en.wikipedia.org/wiki/Jamie_Zawinski
@Luclecool123
@Luclecool123 6 ай бұрын
Calling it priority 0 (P0) is actually smart as there is no ambiguity to if it is the highest priority or if there is a higher level than that.
@LordHonkInc
@LordHonkInc 6 ай бұрын
Yeah, I was just about to say that. I mean, what's the alternative? Starting the lowest priority at 1 (or 0) and then your highest priority would be, what, INT_MAX? xD I think every priority system I can think of works this way: DEFCON, protection rings, etc.; even just saying "it's my top priority," like, where do you put that in a list? At the beginning, number 1 spot of a list, not all the way at the bottom, right? "My top five movies! My favorite, at number 5..." Nobody would do that
@pluto8404
@pluto8404 6 ай бұрын
if you put your priorities in an array, the 0th index would be the first priority.
@abz4852
@abz4852 6 ай бұрын
*Julia would like to speak with you for a moment*
@christopheriman4921
@christopheriman4921 6 ай бұрын
I mean you could see priority negative infinity as the highest priority considering you should have done that before all of the negative number priorities and positive number priorities so it isn't entirely unambiguous.
@Luclecool123
@Luclecool123 6 ай бұрын
@@christopheriman4921 ok propose that to your boss xd
@trapexit
@trapexit 6 ай бұрын
Where possibly I require all my devs write a function to call the regex and name the function after what it is trying to do + add documentation to explain in English what it is trying to match. edit: tests, in my experience, are just not sufficient. It is very regularly the XY problem. The regex, even with tests, is a solution without a clear articulation of the problem. With teams of mixed skill, may not be devs at all (like data scientists / ML researchers), and English isn't their native language... tests just because manifestations of their ignorance. Blind leading the blind. It becomes much easier to spot an error if the problem is explained in human language.
@gagiotter4114
@gagiotter4114 6 ай бұрын
I force every regex to have a shitload of tests, and then reviewers when they try to see what it could possibly do add more test cases. those test cases end up being better documentation than any comment or whatever.
@trapexit
@trapexit 6 ай бұрын
@@gagiotter4114 Yes, tests are assumed here. But tests don't make the intent clear. You can test something fine but not know what exactly the author intends to match.
@natescode
@natescode 6 ай бұрын
​@@trapexittests definitely clarify what is intended to be matched and what isn't
@doc8527
@doc8527 6 ай бұрын
Test only captures what you know. Test cannot assume what you don't know. It's more an assurance of the past implementation upon the future update. The worse part of regex is that it usually contains a lot of unknown unknowns that many pretend they know. Then the CPU starts to burn. My 2 cents: people who said test is enough never understand the purpose of test nor TDD. Documentation, review to double check if you truly need a regex (95% of the times you don't) is always the way to go.
@doc8527
@doc8527 6 ай бұрын
from my recent bias experience, people who used regex extensively were usually juniors or college kids who obsessed to the fancy one line solution. or just direct copy paste answer from stack overflow or GPT. For their simplest case it works, but always fails in some edge cases nobody thinks of. The solution is the easiest copy-paste without requiring them to read through huge chunk of codes like other solutions (those are actually the one they should copy&paste). Often lead to issue later.
@UnFiltered1776
@UnFiltered1776 6 ай бұрын
I love how the chromakey replaces the hair.
@pupfriend
@pupfriend 6 ай бұрын
Little known fact. Regex was invented by the same guy who invented water boarding.
@jearsh
@jearsh 6 ай бұрын
"i fumbled the bag harder than amazon prime did with wheel of time"...i felt that
@wlockuz4467
@wlockuz4467 6 ай бұрын
When I first write a regex only I and god understand what it does. When I look at the same regex later only god understands what it did.
@mitchierichie
@mitchierichie 6 ай бұрын
You said compartmentalized correctly the first time 😅
@demolazer
@demolazer 6 ай бұрын
Using a long regex for something of this magnitude is insane. The slightest extra character, an erroneous space, can blow the whole thing.
@beatboy6690
@beatboy6690 6 ай бұрын
What would you use otherwise?
@sack-shaw
@sack-shaw 6 ай бұрын
@@beatboy6690 at this level of complexity, you should probably write your own parser by hand.
@natescode
@natescode 6 ай бұрын
​@@sack-shawwhich will be 1000X more characters with possible errors.
@chepossofare
@chepossofare 6 ай бұрын
I'd rather write a bunch of "contains", regexps are a viable option imho only if your output is insanely random.
@chepossofare
@chepossofare 6 ай бұрын
@@sack-shaw +1 for the parser, which is testable and reliable.
@Stealth86651
@Stealth86651 6 ай бұрын
How do you dye your hair semi-transparent?
@raffimolero64
@raffimolero64 6 ай бұрын
you just have to semi-die inside and become a semi-ghost
@theodorealenas3171
@theodorealenas3171 6 ай бұрын
With a lot of yoga or prayers
@pdcx
@pdcx 6 ай бұрын
i was just fixing some slow regex using atomic groups, lookahead and timeout and you just reviewed a relevant news. now thats a good coincidence.
@animanaut
@animanaut 6 ай бұрын
chat: zip codes ... easy uk: kind sir, do i look like a humerous joke to you?
@limesta
@limesta 6 ай бұрын
Think of priorities as 1/X The bigger the number the higher the priority. P0 means not only mission critical, but company killing if its not addressed.
@acharris
@acharris 6 ай бұрын
REGEX is the darkest of black magic. It's power - boundless. It's danger - unfathomable. Even Great Cthulhu shudders at its blasphemous might!
@conceptrat
@conceptrat 6 ай бұрын
Lesson learned. Too many sheriff's in Tombstone!
@ZingsVideos
@ZingsVideos 6 ай бұрын
"Now you have two problems."
@havocthehobbit
@havocthehobbit 6 ай бұрын
Regular expressions are extremely fast over large chunks of text not large amounts of chunks. It's made for scale in size but not quantity. Run regex over 100 thousand lines in nano seconds but run the same over 100 thousand times on individual lines and it costs a few seconds. It's one of those use sparingly things and they can hard to read wen sharing with teams, I a oid them when possible
@dutchcaveman2937
@dutchcaveman2937 6 ай бұрын
And this is why i define REGEX_DEFAULT_MATCH_TIMEOUT so the CPU won't hang on a RegEx, instead it throws an exception when timeout has been reached.
@user-lz2oh9zz4y
@user-lz2oh9zz4y 6 ай бұрын
Who would win? A global scale 35 billion dollars company, or one regex boy .*.* = .*
@mikescholz6429
@mikescholz6429 6 ай бұрын
Don’t feel bad, I stumble almost every time I say “Sausage McMuffin”
@tc4v
@tc4v 6 ай бұрын
What's wild is that this problem isn't possible with NFA regex engine, which has been known for decades, and implemented in things like grep and Go.
@darnaram
@darnaram 6 ай бұрын
What I want to know is whether there is a good course for regex so that I never get screwed for the same
@Bolpat
@Bolpat 6 ай бұрын
I'd say, as a rule, if you reviewed a PR and something bad happens because it's been merged, you have twice the fault of the person who wrote it. Seeing errors in someone else's code is so much easier than seeing errors in your own code.
@sexwax4191
@sexwax4191 6 ай бұрын
No one, literally NO ONE, fumbled as hard as netflix did with the witcher series.
@logon-oe6un
@logon-oe6un 6 ай бұрын
God simply didn't give the average human read permissions for Regex. Who are we to defy the sysadmin of our universe.
@KingsKeep
@KingsKeep 6 ай бұрын
His realization at the end had me crying 😂😂😂 We're all doomed!!
@WralthChardiceVideo
@WralthChardiceVideo 6 ай бұрын
I like how the regex isnt even all that complex but they still messed it up and quite honestly, I guess that could happen to the best of us. None of this is an argument against regex itself. It's just a pattern matching DSL after all that isn't even all that complicated.
@Wyklepheph
@Wyklepheph 5 ай бұрын
Lmao, had to do backend sanitization of form data and thought “I could regex this” then I was like “why tf wouldn’t I just .contains?
@CoderDBF
@CoderDBF 6 ай бұрын
What I like about Regex is that you can define a pattern and then the sequence you give it must match that specified pattern. Personally I think Regex is a genius invention, I love them, I use them all the time.
@kylek.3689
@kylek.3689 6 ай бұрын
This guy coming out with a generic ass ChatGPT comment 🤖
@dakata2416
@dakata2416 6 ай бұрын
Where is your Regex license?
@ConernicusRex
@ConernicusRex 6 ай бұрын
P0 is "Priority 0" the highest possible outage/bug priority. It's an all-hands-on-deck fuckup situation. Anything P0 means the company is on fire. (They use this terminology at Netflix, i'm not sure why Prime doesn't know it).
@theairaccumulator7144
@theairaccumulator7144 Ай бұрын
Fake former Netflix engineer
@lewisse_8966
@lewisse_8966 6 ай бұрын
Their mistake was using .* anywhere that isn't the end of the regex
@RenderingUser
@RenderingUser 6 ай бұрын
bro's hair is now almost entirely alpha
@JonnyRobbie
@JonnyRobbie 6 ай бұрын
so, what was the bet he lost?
@RenderingUser
@RenderingUser 6 ай бұрын
@@JonnyRobbie I don't even know
@stacklysm
@stacklysm 6 ай бұрын
Bro got the #00FF00D7 hair tint
@desertfish74
@desertfish74 6 ай бұрын
blue hair
@tropickslol
@tropickslol 6 ай бұрын
​@@JonnyRobbie he basically did a sub goal
@Oscaragious
@Oscaragious 5 ай бұрын
I actually find it relatively easy to read regex, especially enough to know most people don't know how to write it well.
@EagleAngelo
@EagleAngelo 6 ай бұрын
i dont think there's a single instance in my life where i've seen myself happy about having to use regex... useful, sure, but often at a cost of my sanity.. like some effing warlock blood pact
@creativecraving
@creativecraving 5 ай бұрын
I just came here for the intro. Was not disappointed! 😅
@eppiox
@eppiox 6 ай бұрын
That ending realization ☠
@gauff3r
@gauff3r 6 ай бұрын
The most interesting part is the end - explanation
@darkdudironaji
@darkdudironaji 6 ай бұрын
I was half expecting another 17 minutes of " I fumbled the bag harder than Amazon Prime did with..."
@PhillipDressen
@PhillipDressen 6 ай бұрын
Presume you have a problem. You solve that problem with a regex. Now you have two problems.
@JohnDoe-yx4hi
@JohnDoe-yx4hi 6 ай бұрын
Ya, the second problem is figuring out what to do with all of the free time that I got from solving the first problem with such great speed.
@Bolpat
@Bolpat 6 ай бұрын
10:00 Dude, the non-capture group just means the same as a normal group, but it doesn't record what it captures for later. It's definitely not the problem.
@choovick
@choovick 6 ай бұрын
Simple rules might not cut it in the firewall rules engines, so they give you refex as more flexible option. And most ppl shoot themselves in the foot... Cloudflare was just big enough to notice.
@AlgorithmAlloy
@AlgorithmAlloy 6 ай бұрын
“I can’t say compartmentalized” but SAYING IT CORRECTLY IN THE STATEMENT 😳 How
@electrolyteorb
@electrolyteorb 6 ай бұрын
That Article by Aditya is such a clusterfck... Too much foreplay
@electrolyteorb
@electrolyteorb 6 ай бұрын
And only foreplay
@Dom-zy1qy
@Dom-zy1qy 6 ай бұрын
I think being a regex god is a characteristic of a 10x developer. Im not gonna lie though i have procrastinated learning regex for years and just end up "bruteforcing" a regex on the occasion i need one.
@ITR
@ITR 6 ай бұрын
Only 8 minutes in, but wow that is a horrible regex. Why are they OR-ing all those symbols instead of putting them inside square brackets? Why are they suddenly using parenthesis inside square brackets instead of just escaping it? What's the point of putting the entire regex in a non-catching group? What's the point of having a final non-catching group in the regex when it's not repeated or made optional. How do they expect .*.* to work?? And what are they even trying to detect with that, it's like they're looking for code with an optional semicolon, then capturing: logic symbols that's turing complete in js, then any text with an equals sign in it??
@ristopaasivirta9770
@ristopaasivirta9770 6 ай бұрын
All code I write is un-regular expression.
@HimothyOHooligan
@HimothyOHooligan 6 ай бұрын
The Witcher reference made me feel so seen.
@weathercontrol0
@weathercontrol0 6 ай бұрын
"NO REGEX IS INNOCENT" sent me 😂
@AniAdamPashut
@AniAdamPashut 6 ай бұрын
you always feel like a genius when your pattern work only to feel like a dumbass when you find a bug
@conceptrat
@conceptrat 6 ай бұрын
I see you're doing the whole blue green thing now 😂
@TECHN01200
@TECHN01200 6 ай бұрын
Flip's editor humor as of lat has been on point.
@MorgurEdits
@MorgurEdits 5 ай бұрын
One thing to midigate regex readability is to use verbose option always when possible then you can explain each line of regex with comments for example.
@batboy49
@batboy49 6 ай бұрын
@4:40 you got that right I thought it was just me. I cannot help myself I glaze over everytime a regex is there and I have tried and tried to just master it.
@HolgerNestmann
@HolgerNestmann 6 ай бұрын
In my line of work Regexps are often used in configs. Because „uhh no code change?“, no matter how well a CD is setup. So one rather has to fumble with a regexp
@akinwunmioluwaseun3772
@akinwunmioluwaseun3772 6 ай бұрын
Thank God for jippity
@kon-jakub
@kon-jakub 6 ай бұрын
I saw the title and immediately knew this vid would be fing good.
@TurtleKwitty
@TurtleKwitty 6 ай бұрын
Priority makes sense, think of it as a todo list; priority 1 menas its the first item on the list and therefor higher priority on the list (physically) priority 0 is "dont even write it down just do it"
@ThomasKinzer
@ThomasKinzer 6 ай бұрын
Contrast. Shit beginning. Best ending ever.
@theodorealenas3171
@theodorealenas3171 6 ай бұрын
I don't trust regex to run while I'm asleep. I use them like toilet paper, or like the oven. I do have a regex in my computer but it's not waiting for an http request, it's waiting for my filthy fingers to scratch the keyboard
@erictrinque6513
@erictrinque6513 6 ай бұрын
Flip again and always the Realest MVP. .. Prime... Quit Strokin out bruh, get you a coffee
@pianissimo7121
@pianissimo7121 6 ай бұрын
Deja vu. Didn't you already read a regex problem article before?
@pianissimo7121
@pianissimo7121 6 ай бұрын
Oh nvm, I had seen the Kevin Fang video
@ElvenSpellmaker
@ElvenSpellmaker 5 ай бұрын
This reminds me of the Stackoverflow Regex outage.
@jamauldrew
@jamauldrew 6 ай бұрын
Regex is just a hope and a prayer 🙏 😂
@NotThatKraken
@NotThatKraken 6 ай бұрын
I was killed by a regular expression once…
@conceptrat
@conceptrat 6 ай бұрын
P0 incident. No available toilet!
@Machtyn
@Machtyn 6 ай бұрын
What the?!!! They skip the review of a regex? That's the bit that I would put the most review on. I love regex, but I also understand the statement, "You have one problem. Use regex to fix it. Now you have two problems."
@VoxelPrismatic
@VoxelPrismatic 5 ай бұрын
regex is very useful for separating strings based on patterns, like for syntax highlighting or markup. this is a horrendous misuse of regex
@tofonofo4606
@tofonofo4606 6 ай бұрын
I am realizing that flip may bring me as much joy as Prime does. ( maybe more, don't tell daddy. I know he don't read yt comments )
@hukasu
@hukasu 6 ай бұрын
reminds me of when stackoverflow got taken down by a regex trying to parse 20000 white spaces
@1337cookie
@1337cookie 6 ай бұрын
.*.*=.* should be known as the hungry hungry caterpillar emote.
@__christopher__
@__christopher__ 6 ай бұрын
Regexes are like machine code. Except people don't use assemblers to write them, let alone high level languages.
@thedoctor5478
@thedoctor5478 6 ай бұрын
Please interview the engineer responsible. I'm sure he's hiding
@jfftck
@jfftck 6 ай бұрын
The P0 priority sounds like they are using RegEx to turn the code into an index for their incident system.
@mble
@mble 6 ай бұрын
"No regex are innocent" ~Prime 2024
@wnichols6671
@wnichols6671 6 ай бұрын
Flip *doesn't take it out*
How I Destroyed My Company's DB
15:35
ThePrimeTime
Рет қаралды 121 М.
10 Coding Habits To Avoid
25:53
ThePrimeTime
Рет қаралды 165 М.
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 20 МЛН
ISSEI & yellow girl 💛
00:33
ISSEI / いっせい
Рет қаралды 23 МЛН
WILL IT BURST?
00:31
Natan por Aí
Рет қаралды 12 МЛН
а ты любишь париться?
00:41
KATYA KLON LIFE
Рет қаралды 3,4 МЛН
The Truth About The Fast Inverse Square on N64 | Prime Reacts
16:59
ThePrimeTime
Рет қаралды 100 М.
Code That MURDERED 6 People | Prime Reacts
17:57
ThePrimeTime
Рет қаралды 245 М.
Cloudflare Deploys Really Slow Code, Takes Down Entire Company
13:24
Don't Write Comments | Prime Reacts
14:31
ThePrimeTime
Рет қаралды 217 М.
Remote Work Won | Prime Reacts
35:56
ThePrimeTime
Рет қаралды 102 М.
Minecraft Server In Bash | Prime Reacts
28:58
ThePrimeTime
Рет қаралды 116 М.
Rails Deserves Better.
32:33
Theo - t3․gg
Рет қаралды 51 М.
Prime Reacts: From C to C++ to Rust to Haskell
40:54
ThePrimeTime
Рет қаралды 305 М.
How To Get Into Software | Prime Reacts
16:34
ThePrimeTime
Рет қаралды 117 М.
Underwater Challenge 😱
00:37
Topper Guild
Рет қаралды 20 МЛН