That's the trick, it always makes sense once it's explained. How long would it take you to reason towards that explanation on your own? You'd need to know how objects are coerced to string and how square brackets work in regex. And where to start looking.
And like I'm a big advocate for basic regex competency, which I do feel this falls under. But also in my experience most devs don't have basic regex competency.
View all comments
Show parent comment
1
u/Exaskryz Mar 21 '24
Weird, I'm no expert but bottom half of OP makes perfect sense.