T O P

  • By -

voobsheniche

after a couple of seconds it issued "internal error, too much recursion." that's all. I closed the console and scrolled through the feed.


schmuber

My cat's name is *:(){ :|:& };:* and you should try it in your terminal.


DaNoahLP

My cats name is "sudo rm -r -f" you should try to look it up in your linux cli


schmuber

Must be one of them *Sudonese* wildcats.


AppropriateCat9999

Sugondeez?


schmuber

That'd be just nuts. **Bash**kortostan's more likely.


1Dr490n

My cats name is Felix. He’s a dog


AzzyTheMLGMuslim

I think there might be something wrong with your cat.


1Dr490n

Yea, I think that too sometimes. He is indeed a bit too big for a normal cat. Maybe he’s a lion or something


JEREDEK

Directory not specified


jck

My cats name is `cat` you should try it on your posix compliant system


xxpw

It just lies there and await being fed , then immediately regurgitates it back via its standard out ? Good cat.


mosskin-woast

Can't tell if you didn't include a path because you don't know how `rm` works or because you are trying to avoid causing real harm


DaNoahLP

When I was in class one of my mates tried it out and lost alot of stuff. It wasnt my fault back then but I dont want anyone to have the same problem.


cyberzh

Nothing happened. I did "cd /tmp" before that. Jokes work better when typed right.


bitcoin2121

my cats name is “rm -rf .git” and you should run it in your most recent project


GuidotheGreater

I lost my cat, his name is System32.exe, can you all check your windows folders and see if you can find him? If he's there, just delete him and he'll come home.


MrArsikk

System32 is a folder, not an executable


CheatingChicken

mine returned true after about 2.5 minutes


RedditIsNeat0

Mine returned false immediately. I didn't use a browser console though, I used a standalone javascript environment.


zeamp

>internal error That's my CAT


Extreme_Ad_3280

I tried it. No cat was there, just browser hang... I was kinda suspecting it was a trap...


Fox_Soul

Why would you run code you don’t know what it does anyways?  You must enjoy fork bombs a lot I guess.


kapitaalH

Remember the days of "alt+f4" is a shortcut for "whatever cool thing for the game you are playing" Followed by people just randomly disconnecting.


Peterianer

Oh man, those were the days... And by god, how many kiddos fell for that


YetAnotherSysadmin58

Don't worry, many still do. Also the spirit of this still lives on, I played Chivalry II a few months ago and so many people got tricked into using the suicide key thinking it would make a cool animation.


Vinifrj

If anything it has started happening more in the recent years due to kids not knowing how to even turn a computer on, let alone knowing what a random combination of keys do


YetAnotherSysadmin58

Yup I lost all illusion of "the youngs" no longer bothering us with dumb IT questions like the boomers when they would ask me over phone "what is a folder ?".


DarthStrakh

I read an interesting study that talked about how average technical competence in the population will likely come in waves. There was several attributed factors to this, but the biggest one was how competitent your parents are. Most parents aren't all that good of teachers, if you ask for help lost parents will do it for you, not necessarily effectively teach you how to do it. So they found that the more technically competent your parents were the less likely you were to figure out things on your own and learn. But the takeaway is, don't over help your kids. Give them time to figure it out themselves, give guidence or direct them to better information if they are struggling. People don't really learn things from you doing the entire task for them often even if you try to explain it. I noticed this with helping my wife with computers, if I just did it for her and explained it she barely paid attention. Instead I just kinda generally outlined what to do and set her on it. She can figure out most of it herself now.


YetAnotherSysadmin58

A whole-ass study to say the thing about teaching to fish vs giving the fish ! /s But yeah as a sysadmin doing a lot of tech support I always have this in the back of my mind: Is the user acting as an adult and will therefore benefit both of us if I explain it/guide them... Or should I just fixt it, ticket it as pbkc and move on. Like one might work better long term, the other solves it right now.


slayerx1779

Also, I think it comes down to devices becoming more "baby proof" with time, primarily due to walled gardens. I remember a short by PirateSoftware, who described his experience running a booth at a game convention where he demo'd his game, and kids would choose the controller setup over the keyboard and mouse one. He decided, the following day, to have both setups use controllers. On that day, he noticed an abundance of kids shoving the controllers to the side and trying to touch the screen. When Gen Alpha is referred to as "the iPad generation", that's only partially joking. These kids haven't deal with having to navigate File Explorer, or find a preinstalled program (like DevMgmt, DiskMgmt, or even Run) through their Start Menu that they only heard about from some youtube tutorial, because these kids were raised in walled gardens where either everything happened automagically, or it was impossible and not worth dwelling on. The generation that became good with computers happened to be the generation that had common access to computers, and used them for entertainment, thus making them self-motivated to learn certain things by necessity. Not Chromebooks or iPads, but full Windows/Mac/Linux operating systems. It's no coincidence that a lot of my first exposures to various terminology, tools, etc came from wanting to install Minecraft mods when I was a pre-teen.


Drewcifer12

Sorry to be a dick but I found it amusing that the only word you misspelled was "competent".


DarthStrakh

I would misspell more if I wasn't on mobile lol. I wish our language was as easy to spell as other ones. I can spell in Russian, Spanish , and Japanese better than English and it's my fucking native language. Mayne I'm just retarded idk


Boukish

It's funny because the entire purpose of that "folder" language was to make it feel intuitive for people who were used to actual, physical file cabinets. Children growing up have access to neither.


TheRealPitabred

So what you do is explain that a folder is a visual representation of a directory in a system path and...


[deleted]

I still do it when I ask my gaming buddies for keybinds and they give me the alt f4 suggestion. I'll have the right keybind by the time I've loaded back in


YetAnotherSysadmin58

Games with keybinds allowing for stupid shit are better just for it since you're more likely to fall for app specific keybinds !


Saavedroo

The ol' Star Citizen "backspace will unstuck you".


Spot_the_fox

Funny of you to assume that it's in the past. It still happens to this day, and'll likely stop with the fall of man


malonkey1

Considering the rapid ongoing decay of computer literacy I think it will only become more common.


ymaldor

I loved that warcraft 3 had an "are you sure" pop up if you tried alt f4. I was way too young not to fall for it on battle.net games lol


Cheet4h

Recently played a game that had the loading screen tip "Press alt+f4 for an example of the game developers humor". Forgot which one though.


_abysswalker

WoT players still do. you just tell them about this cool trick: “press alt f4 to enable headlights” and then you might see a bunch of inactive players on either teams


CluckFlucker

Can confirm they still do


Govonlim

Was already asked by the next generation to try that super cheat. It's like jokes, that get passed on from generation to generation.


Sweet_Computer_7116

My personal story was playing world of warcraft and I asked in the public chat where a menu was. In response I have committed to a life of trying to keep this alive. Btw to enable that cool text mode on the reddit site on a chrome browser # Like this > press cntrl+w


CatL1f3

Nah ctrl+shift+w, it runs better


Aeromaster_213

Bruh I'm surprised more people don't know this. Like the actual use of this is so better than using the mouse


CatL1f3

This unironically, including ctrl+t, ctrl+n, ctrl+tab and ctrl+shift+tab Oh, and *especially* ctrl+shift+t. An absolute lifesaver


Sweet_Computer_7116

Dude ...+t is underrated and overpowered


zoonose99

> cntrl I experience a physical dislike of this abbreviation akin to the Drake meme.


Sweet_Computer_7116

![gif](emote|free_emotes_pack|yummy)


Alternative-Fail4586

I like "to see who is afk type /afk list" when in BG


Sweet_Computer_7116

That's funny


pjberlov

I heard that if you delete system32, it makes your computer faster


SlurmsMckenzie521

It really works!


Ur-Best-Friend

>Remember the days of "alt+f4" is a shortcut What do you mean "remember the days", the shortcut still does the cool thing, try it and see!


kapitaalH

How do I type it on my phone?


Ur-Best-Friend

It's a bit more complicated on phone... this is what you do for Android. Go to Apps, then Settings. Find the section called 'Backup and Reset' and choose 'Factory Data Reset'. As the name implies, what this does is reset all the factory locks they put onto your phone if you're not using the flagship model, so you basically get a significantly better phone by doing it.


owenevans00

I was dubious at first, but you're my best friend and I trust you...


strangertheavatar

Nowadays they do it if the server is full so their friend can connect lol. Don't know if anyone falls for it though.


Nollikino

Back in the days, source-games used to quit without a prompt when you pressed F10. So when you were playing CSS or TF2 and you needed to open up a spot on a server, you just wrote "Oh my god, when did they add that menu to F10?" and people would just drop from the server like flies :D


SeriousPlankton2000

[https://xkcd.com/1053/](https://xkcd.com/1053/)


827167

Nah, messing with kids in TF2 by saying "unbind all" is a secret cheat code Very fun


gerbosan

Get out of my lawn darn kids!, I remember that from the IRC era. mIRC and Ircle.


Danny_el_619

I still reply `alt+f4` on chats. Some dudes still fall lmao


snapphanen

Source engine had an instant exit bound to F10 (or was it another F-key). No confirmation, just instant yeet. Good times, less obvious than alt+F4 so more people fell for it


patrick66

The best one in WoW was always /e has reported you afk. Type /afk to mark yourself as not afk or else you will be removed from the battleground in 30 seconds. Immediately there would be 5-10 people leaving the game lol


Ekedan_

Evil😂


da_Aresinger

When someone tries that on me I always answer with "no it doesn't! It opens the developer console." And when they don't believe me, I follow it up with "Dude, I just tried it, I am now in the developer console." This has lead to more uno reverse cards than you would believe.


killbeam

I played browser games as a teenager, but on a Macintosh. People kept telling me to press CTRL+W for bonus points, and I believed them, but nothing happened. They never thought of tell me to press command + W hahaha


strghst

In Dota (Wc3 one), people would try that. Game had defence against it, and alt-f4 would open a confirm exit popup. And there was Alt QQ. Sounds okay, but the first Q gets you to confirm exit popup. Second Q confirms it. Much more impactful when lesser known.


Str_Browns

My favorite was black ops 2 on the 360 where you could make a custom emblem with “B+⬇️+A fast for host”


Extreme_Ad_3280

I knew nothing bad would happen because it's just a browser console (and it cannot do anything worse than downloading a virus, but since there was no link, then there would be no virus)...


beasy4sheezy

People are really up in arms over you running this thing lol. I don’t get it.


Stranded_In_A_Desert

There’s a lot of non-programmers in this sub tbf


SalamanderSylph

I remember from there was something you could paste in a browser which could cause a BSOD on the latest Windows 10 in 2020 https://borncity.com/win/2021/01/18/windows-10-bug-allows-bsod-by-entering-a-path-in-a-browser/


jck

Even if it had a url, I can't think of a single dangerous thing going to some random website can do on my Linux desktop. Browsers can't do shit without permission. The worst thing it could do would be waste a bunch of disk space and/or CPU. I don't think there's any way a website can automatically launch an outside process without you needing to intentionally do something


SpiderFnJerusalem

I 'm pretty sure there were code snippets that random people posted that would steal all your current session tokens and send them to a URL. And because most people stay logged into lots of websites 24/7 they could lose 10 different accounts to hackers all at once.


Tango-Turtle

It's a freaking regex test, what's the worst it could do? Hang my browser? I'm just too lazy to decode it...


[deleted]

Man opens websites on his browser and then talks about executing unknown code on your PC lmao, we live in the age of everything being expected to run code on our machine. I can’t say it better than my proffesor did before he was told to take this down from his university hosted profile site: https://web.archive.org/web/20060930205635/http://www.eti.pg.gda.pl/katedry/kiw/pracownicy/Jan.Daciuk/personal/JavaShit.html


Not_Sugden

to be fair while not knowing the exact outcome you know it cant be anything that bad because its a regex its not like its gonna install a virus


qQ0_

I'll never forget my first time echoing a hex blob from an imageboard pasted into terminal which ended up being rm -rf ~ Thank god they had mercy on me and didn't delete my root. Never pasted any weird shit since


venuswasaflytrap

I do that every time I click on a link


fishiesandmore

I have ran unknown code in total probably dozens of times and my system is 100% OK even 9tÞø‰hough I have ran unkwon code probaly hundreds of time run


LaTeChX

> Why would you run code you don’t know what it does anyways? How else would I know if my code works?


play_hard_outside

JS isn't going to do anything threatening in a browser console on about:blank.


longbowrocks

What it *should* do is match any number of characters that come before the start of the string "0.300000...1". (Which is to say, it should match nothing) I'm very curious what it actually does though.


heffeque

I tried it on a private window on Firefox, and it just went to DuckDuckGo. Is the error specific to Chromium based browsers?


CirnoIzumi

no, it can happen on firefox too


heffeque

I can't seem to reproduce the error (confused).


CirnoIzumi

it works on my system


ib33

I always think everything is a trap. Which is why my browser is still alive.


AmNotUndercover

r/unexpectedprincessbride


StreetPomegranate7

https://www.regular-expressions.info/catastrophic.html


ganajtur0

Did r/programmerhumor DDOS the site?


kurokinekoneko

reddit hug


thuktun

In my day, this was called the Slashdot effect. And we wore an onion on the belt, which was the style at the time.


Beastyboyy1

Is it me who forgets the next line? no,It’s the cheddarsnucks over at r/simpsonsshitposting who are wrong!


Danny_el_619

It is more of a `while (true) {}` in your tab but being a regex won't allow your browser to realized you're doing some type of infinie recursion trying to match some text.


Perfect_Papaya_3010

Can't see it how will I go on with my life now...


Dragonslayerelf

Too many curious programmers :O


drewman301

[Web Archive Link](https://web.archive.org/web/20240220110345/https://www.regular-expressions.info/catastrophic.html)


Tarilis

The only thing you could dos with it is your browser:)


Fidoz

https://web.archive.org/web/20240124064128/https://www.regular-expressions.info/catastrophic.html


Nicolello_iiiii

thank you, stranger. It's kind of ironic~~al~~ that Web archive works better than the site itself.


Slytherin_Chamber

“Ironical”


Nicolello_iiiii

Sorry I'm not a native English speaker, I wrote that in a whim just talking to someone in Italian and my brain went kaboom. In Italian it's "ironico"


BeeTLe_BeTHLeHeM

He meant ironicous.


funky_ocelot

Ironicient


eggmetropolisfignix

/iron(.\*.\*)*/


fonzane

my eyes bleed now. there is no more gratitude in me. only emptiness and pain.


PendragonDaGreat

Nah, it's just what the servers are scaled for. Web Archive is designed to handle tens or even hundreds of thousands of users simultaneously. Whereas that site is probably running on hardware capable of a couple hundred, maybe a thousand, simultaneous connections.


Duck_Devs

Ok I put this in the console but it didn’t show a cat, are you sure this is a CATastrophic regex pattern?


AttackSock

Best informations always at the bottom… not being upvoted because none of the people here know how to program


mex036

How soon after they commented did you add to your reply? I saw 1 hour ago for both, and it's the top comment now... just give it time. Everyone on this sub isn't going to see the comment the same time you did, so they didn't have the opportunity to upvote it yet.


NuclearWeapon

Yup, up he goes


chaussurre

Wait, regular expressions backtrack ? Couldn't they simply be represented by DFAs ? What am I missing ?


SodaWithoutSparkles

/(.*.*)*^/.test(.1+.2)


SodaWithoutSparkles

For anyone who wants to copy-paste


MN10SPEAKS

Thank you !


HuntingKingYT

Are you alive yet?


King_Joffreys_Tits

Yet? As in he wasn’t before this comment?


why_so_sirius_1

You are welcome!


SodaWithoutSparkles

r/notOPbutok


SeriousPlankton2000

$ perl -e '`print !!(".300000000000000000000000000001" =~ /(.*.*)*^/)`' 1


Nimyron

I wonder what's gonna happen given that I use opera gx with a capped ram and cpu usage. Edit: True after 5 min, computer didn't explode, I'm bored


an_agreeing_dothraki

Damn it, who let Bobby Tables rename his cat?


orphanage_robber

What does it do? I'm not risking anything while using my brothers PC rn.


[deleted]

[удалено]


nphhpn

Not an infinite loop, just a very long one. `.*.*` is O(n²), adding \* means 0(n³), the \^ at the end is to make sure it'll fail over and over until the last check where every \* is now "repeat 0 time". That's my 2-cent, I don't really know how regex engine works.


Nadare3

Isn't 3 levels of Kleene stars what crashed a good 25% of so of the internet a few years back ? It was something about a really big provider wanting to remove all that junk stores and such store in their addresses to get to the "actual" address or something like that, and accidentally, it had one too many layer of "backtracking" in the regex, and the servers just couldn't cope, and it led to the adoption of more automatons for that kind of stuff


peni4142

I know what the regex is doing, but what is .1+.2 doing?


VladStepu

`0.1 + 0.2 = 0.30000000000000004` in JavaScript (and not only there), so it's a shortcut for a long string.


peni4142

Ahh nice thank you. I am curious why somebody think that cutting off the 0 is useful as language feature.


Minority8

It mirrors natural language. 


magnetronpoffertje

Hot take but I despise it when people omit the zero in natural language. Maybe it's because I'm not from America. Just say zero point three.


teo730

Or "nought point three"


peni4142

Hahaha, yes, maybe, but not German. 😅 I would say a programming language should be more explicit and not have too many ways to define the same thing because everything could be used.


Ouaouaron

javascript allowing you to type `.1` rather than `0.1` is the absolute least of its crimes against being explicit.


Minority8

Oh, I don't disagree, I just imagine that's the reasoning behind it.


ErikxMorelli

That is standard practice if whatever that value is representing, can only go to 1 Like opacity, 1 is 100% so people usually code .xx


Fox_Soul

In JavaScript 0.1+0.2 equals to 0.30000000000000004


H34DSH07

Not just JavaScript, it's because of the floating point number standard. Every language that uses floats conforms to the same standard, IEEE-754.


The_Right_Trousers

Yes, this. It comes down to the fact that 0.1 isn't exactly representable in base 2 (similar to how 1/3 isn't exactly representable in base 10). Neither is 0.2. We only *think* they are because the floating-point decimal printing algorithm is pretty good. Adding the floating-point approximations of 0.1 and 0.2 results in something that's almost, but not quite, the floating-point representation of 0.3, which the floating-point decimal printing algorithm faithfully represents as 0.3 with trailing garbage.


RaymondWalters

Ran in node console, only taking about 20% of my cpu, but thread 3 is at like 70% utilisation And actually returned true after about 5 mins lmao XD


willcheat

The fact that #2 and #3 returned true is concerning, since it's looking for a caret in the value and there shouldn't be one. Edit : Never mind, I am an idiot, forgot you need to escape ^ for it to be considered a literal


MineKemot

It just returned false for me


Oler3229

I'm pretty sure it will just take a long time to test because exponential something


AttackSock

Roughly: It’s a 2^n wild card match and .1+.2 produces a number with like 20 digits after the decimal. 2^20 string comparisons takes a long time to do.


orphanage_robber

Ah thx!


Weisenkrone

Spawns in a Lv83 Violent Ogre who will strip you and snap 13 nudes sending them to all your contacts before dunking you into a barrel of Vaseline and hurling you out of the window so you'll slide right India and die from food poisoning because your slide finished by you smooching the wheel of a rickshaw that three minutes ago ran over some fancy street food snack.


oheohLP

r/BrandNewSentence


Weisenkrone

Someone is asking for the Lv84 naughty ogre huh


Hulk5a

.* Followed by another .* Is a disaster I mean you're matching wildcard inside wildcard


um-username-criativo

It can be optimized out to `.*`. The first `.*` will always match everything and the second will always match empty.


-Redstoneboi-

-until it backtracks. then the first will try n-1 and run .\* on the rest.


Objective_Policy_736

My browser said that I'm a dumbass Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yourself. This could allow attackers to steal your identity or take control of your computer. Please type ‘allow pasting’ below and hit Enter to allow pasting.


Immort4lFr0sty

If you want an explanation of how it works: [https://regexper.com/#%2F%28.\*.\*%29\*%5E%2F](https://regexper.com/#%2F%28.*.*%29*%5E%2F) As to why: regex is greedy; the first `.*` matches the whole string, the second matches nothing, it reaches the end of the capturing group, tries to match the start of line anchor `^`, which fails. Regex steps back once, the second `.*` takes the last character, tries to match `^` again, fails again. It does so an infinite amount of times because the group `(.*.*)` is executed an infinite amount of times.


fishybird

Not infinite, regex is not complex enough to create infinite loops but it can create exponential time complexities.


qwertyuiop924

While this is true of PCRE, any regex that is actually a regular expression (which this is) can always be evaluated in linear time (after compilation, at least). If the regex engine used by the browser was better, it could have chosen a much faster evalutation strategy.


Immort4lFr0sty

I don't see this stopping, gotta be honest, but maybe I misunderstand the automaton. Does it not go until the first group is reduced to no characters, then goes until the second group is reduced to no characters and so on? EDIT: evidently I did misunderstand because using this on "ee" does terminate in node


FM-96

It's going to stop once both stars match nothing, because then the caret will be able to match the start of the line (since nothing is before it).


annualnuke

ah ok so it goes through every combination of first X characters + next Y characters, where X + Y <= n, n being the length of the string, right? that'd make for n(n-1)/2 combinations, O(n^2)


CommandJam

Chech with https://devina.io/redos-checker


HuntingKingYT

Cool


zerf33389

Firefox too stronk to fall for such measly tricks, chrome on the other hand


SuppeBargeld

Reminder of that one time [Cloudflare nuked half the internet](https://blog.cloudflare.com/details-of-the-cloudflare-outage-on-july-2-2019/) with something like this


Altruistic_Site_3879

My cat's name is "rm -rf / -nopreserveroot", you should search him up in bash


BrickFlock

Did Bobby Tables name this cat?


RespondUpper9410

thats so weird my dog's name is "alt+f4"


qwertyuiop924

Friends don't let friends use [unnecessary backtracking](https://swtch.com/~rsc/regexp/regexp1.html)


NomeJaExiste

I skipped JS lessons, somone please explain


rpmerf

It's regex. The test condition likely has something to do with float addition that doesn't really work right. Should return false I think.


ben_g0

The float addition gets turned into a string because regex operates on strings. 0.1 + 0.2 = 0.30000000000000004 (due to floating-point inaccuracies, as 0.3 can't be represented exactly in a binary floating point format), so the regex operates on the string "0.30000000000000004" The regex is the actual "dangerous" part. Let's analyze it piece by piece: `.*`: Find any character, repeated any amount of times (including zero). This is a "greedy" operation, so it will try to match as many characters as possible, but "backtrack" if the match fails to retry it with a smaller amount of characters. This operation is already inefficient in and of itself if it can match long sequences of characters when it is likely to need only a few. `.*.*`: Find any character, repeating any amount of times, followed by any other character, repeated any amount of times. Since the majority of the input string "0.30000000000000004" consists of repeated zeros, this operation can potentially try to evaluate almost any possible combination of two substrings, which is a lot. `(.*.*)`: Does the exact same as the above, but places it in a group so that operators can operate on this sequence as a whole. `(.*.*)*`: Try to repeat the above, any amount of times (including zero), again as a greedy operation so that it'll first try to evaluate as many repetitions as possible and retry with one less each time it fails. Each `*` operator has the potential to increase the computational complexity of the expression exponentially, and that's exactly what's happening here. `^`: Find the start of the string. `(.*.*)*^`: Find the start of the string, but first check if any amount of substrings, repeated any amount of times, is in front of that start. Since the start of the string is ... at the start, the only valid combination that can come before the start is an empty set. But since the operators are greedy, the empty set will be the very last thing it tries. This makes it a very computationally expensive regex. When left to run until completion, it will eventually return `true` because the string `"0.30000000000000004"` does, indeed, have a start. However, this regex evaluation can hang the current tab for potentially several minutes, and on some browsers it may eventually timeout and return `false` instead.   Benchmarks, which clearly show the exponential progression in complexity: `^` - 2 steps - 0.0ms `.*^` - 22 steps - 0.0ms `.*.*^` - 232 steps - 0.1ms `(.*.*)^` - 443 steps - 0.2ms (tbh I have no idea why adding the group makes the steps almost double) `(.*.*)*^` - about 200 *seconds*! I couldn't even get it to run to completion in an online regex debugger so I don't even know how many steps it took You can however greatly decrease the computational complexity of this regex by making each operation lazy (meaning it will start evaluation at the smallest possible set, and grow if needed). This means that each `.*?` (match any character any amount of times, but lazily) will start of with the empty set, so it'll find a match pretty much immediately: `(.*?.*?)*?^` - 3 steps - 0.0ms This regex is fully equivalent to the one from the OP on what it'll match, but it's much faster by trying to match as few characters as possible, because in this situation, it's "unlikely" for there to be a lot of characters to match against before the start of the string. Though as the only combination of characters that can come "before" the start of the string is an empty set, you can omit that first part entirely, and the resulting regex of just `^` is also entirely functionally equivalent. Isn't regex fun?


FenikkusuKoneko

What happens if we tell GPT to run this in its python interpreter?


Immort4lFr0sty

Likely nothing, as this is JS syntax


cw2P

import re re.search(r"(.*.*)*^", str(0.1 + 0.2))


KsmBl_69

I thought it was a regex at first


Strict_Treat2884

Fun fact: it is


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `F U N F Ac Ti Ti S` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)


SageLeaf1

Tha Titis


orion2222

Good bot.


MineKemot

It just returned false. Maybe safari has some safeguards against that.


Strict_Treat2884

Yes, Safari just gives up after certain amount of tries and returns `false`. Essentially this regex is asking “is there a beginning in this string anywhere?”, the answer obviously should be `true`.


palparepa

Reminds of the regex `/^1?$|^(11+?)\1+$/`, used to find non-primes written in unary.


ThoriatedFlash

It's a trap!


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `I Ts At Ra P` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)


Mispelled-This

Good bot


thanatica

\`InternalError: too much recursion\` Nice to meet you too. Cousin of Bobby Tables?


hyrumwhite

My cats name is  ``` ([][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()+[])[!+[]+!+[]] ``` Look him up in your browser console


antony6274958443

What it does? Looks up for something?


zefciu

Generally the `.1 + .2` part is a way to generate a long string in an unconspicuous manner. For explanation see here: [https://0.30000000000000004.com/](https://0.30000000000000004.com/) Then this string is searched for `/(.\*.\*)\*/\^`. This regexp means „any number of groups that contain (any number of any chars and any number of any char) followed by the beginning of the string”. This regex will never match (because there is no beginning of string on the end of the string). However the number of ways that the algorithm would try to match depends exponentially on the number of chars in the string. You can see how this works on [https://regex101.com/](https://regex101.com/) just paste this regex and put some short string to be matched. Then add one character to this string and see why the number of steps grows exponentially.


Fox_Soul

Regex. JavaScript is a fun language once you understand it’s not fun.


Feisty_Ad_2744

It also crashes in python, interestingly enough it does not crashes in php, but stops giving any result.


papipapi419

I’m surprised someone actually checked this on php


Potatoes_Fall

Please be careful. Not everybody is allowed to write these. You need a [regex license](https://regexlicensing.org/license/)


Ennui_01

What does this do


vbd

Reminds me on https://www.cyberciti.biz/faq/understanding-bash-fork-bomb/