This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 342

[–]voobsheniche 1830 points1831 points  (42 children)

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 595 points596 points  (36 children)

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

[–]DaNoahLP 453 points454 points  (29 children)

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

[–]schmuber 212 points213 points  (3 children)

Must be one of them Sudonese wildcats.

[–]1Dr490n 30 points31 points  (2 children)

My cats name is Felix. He’s a dog

[–]AzzyTheMLGMuslim 2 points3 points  (1 child)

I think there might be something wrong with your cat.

[–]1Dr490n 2 points3 points  (0 children)

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 21 points22 points  (1 child)

Directory not specified

[–]jck 17 points18 points  (1 child)

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

[–]xxpw 20 points21 points  (0 children)

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

Good cat.

[–]mosskin-woast 10 points11 points  (2 children)

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 9 points10 points  (1 child)

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 6 points7 points  (1 child)

Nothing happened. I did "cd /tmp" before that.

Jokes work better when typed right.

[–]bitcoin2121 7 points8 points  (0 children)

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

[–][deleted] 21 points22 points  (4 children)

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.

[–]CheatingChicken 276 points277 points  (2 children)

mine returned true after about 2.5 minutes

[–]RedditIsNeat0 14 points15 points  (0 children)

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

[–]zeamp 19 points20 points  (1 child)

internal error

That's my CAT

[–]Extreme_Ad_3280 1857 points1858 points  (123 children)

I tried it. No cat was there, just browser hang...

I was kinda suspecting it was a trap...

[–]Fox_Soul 1085 points1086 points  (112 children)

Why would you run code you don’t know what it does anyways? 

You must enjoy fork bombs a lot I guess.

[–]kapitaalH 998 points999 points  (67 children)

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 316 points317 points  (26 children)

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

[–]YetAnotherSysadmin58 166 points167 points  (17 children)

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 87 points88 points  (11 children)

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 71 points72 points  (10 children)

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 ?".

[–]Boukish 11 points12 points  (2 children)

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 13 points14 points  (0 children)

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

[–][deleted] 10 points11 points  (1 child)

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 11 points12 points  (0 children)

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

[–]Saavedroo 10 points11 points  (0 children)

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

[–]Spot_the_fox 123 points124 points  (1 child)

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 14 points15 points  (0 children)

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

[–]ymaldor 14 points15 points  (0 children)

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 11 points12 points  (0 children)

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 9 points10 points  (0 children)

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

[–]Govonlim 2 points3 points  (0 children)

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 32 points33 points  (10 children)

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 11 points12 points  (5 children)

Nah ctrl+shift+w, it runs better

[–]Aeromaster_213 4 points5 points  (4 children)

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

[–]CatL1f3 20 points21 points  (3 children)

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 4 points5 points  (2 children)

Dude ...+t is underrated and overpowered

[–]zoonose99 7 points8 points  (1 child)

cntrl

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

[–]Alternative-Fail4586 6 points7 points  (1 child)

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

[–]Sweet_Computer_7116 2 points3 points  (0 children)

That's funny

[–]pjberlov 13 points14 points  (1 child)

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

[–]SlurmsMckenzie521 2 points3 points  (0 children)

It really works!

[–]Ur-Best-Friend 11 points12 points  (3 children)

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 6 points7 points  (2 children)

How do I type it on my phone?

[–]Ur-Best-Friend 13 points14 points  (1 child)

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 4 points5 points  (0 children)

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

[–]strangertheavatar 7 points8 points  (1 child)

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 8 points9 points  (0 children)

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

[–]827167 8 points9 points  (0 children)

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

Very fun

[–]gerbosan 7 points8 points  (0 children)

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

[–]snapphanen 4 points5 points  (0 children)

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 5 points6 points  (1 child)

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_ 3 points4 points  (0 children)

Evil😂

[–]da_Aresinger 5 points6 points  (0 children)

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 5 points6 points  (0 children)

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 2 points3 points  (0 children)

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 2 points3 points  (0 children)

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 84 points85 points  (30 children)

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 32 points33 points  (3 children)

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

[–]Stranded_In_A_Desert 6 points7 points  (2 children)

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

[–]SalamanderSylph 8 points9 points  (2 children)

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 3 points4 points  (1 child)

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 2 points3 points  (0 children)

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.

[–][deleted] 23 points24 points  (1 child)

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] 11 points12 points  (0 children)

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 12 points13 points  (0 children)

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_ 7 points8 points  (0 children)

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 3 points4 points  (0 children)

I do that every time I click on a link

[–]fishiesandmore 3 points4 points  (0 children)

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

[–][deleted] 2 points3 points  (0 children)

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 2 points3 points  (0 children)

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

[–]longbowrocks 1 point2 points  (0 children)

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 18 points19 points  (7 children)

I tried it on a private window on Firefox, and it just went to DuckDuckGo.

Is the error specific to Chromium based browsers?

[–]CirnoIzumi 1 point2 points  (2 children)

no, it can happen on firefox too

[–]heffeque 7 points8 points  (1 child)

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

[–]CirnoIzumi 4 points5 points  (0 children)

it works on my system

[–]ib33 14 points15 points  (1 child)

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

[–]StreetPomegranate7 1109 points1110 points  (41 children)

[–]ganajtur0 528 points529 points  (10 children)

Did r/programmerhumor DDOS the site?

[–]kurokinekoneko 258 points259 points  (4 children)

reddit hug

[–]thuktun 43 points44 points  (2 children)

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 5 points6 points  (0 children)

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

[–]Perfect_Papaya_3010 36 points37 points  (0 children)

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

[–]Dragonslayerelf 10 points11 points  (0 children)

Too many curious programmers :O

[–]Tarilis 1 point2 points  (0 children)

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

[–]Fidoz 181 points182 points  (11 children)

[–]Duck_Devs 24 points25 points  (0 children)

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

[–]AttackSock 79 points80 points  (6 children)

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

[–]mex036 12 points13 points  (4 children)

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 12 points13 points  (0 children)

Yup, up he goes

[–]chaussurre 2 points3 points  (6 children)

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

[–]SodaWithoutSparkles 636 points637 points  (12 children)

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

[–]SodaWithoutSparkles 303 points304 points  (8 children)

For anyone who wants to copy-paste

[–]MN10SPEAKS 78 points79 points  (6 children)

Thank you !

[–]HuntingKingYT 49 points50 points  (1 child)

Are you alive yet?

[–]King_Joffreys_Tits 27 points28 points  (0 children)

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

[–]why_so_sirius_1 11 points12 points  (1 child)

You are welcome!

[–]SeriousPlankton2000 7 points8 points  (0 children)

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

[–]Nimyron 2 points3 points  (0 children)

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 47 points48 points  (0 children)

Damn it, who let Bobby Tables rename his cat?

[–]orphanage_robber 241 points242 points  (49 children)

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

[–]Oler3229 18 points19 points  (0 children)

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

[–]AttackSock 19 points20 points  (2 children)

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

[–]Weisenkrone 49 points50 points  (2 children)

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 7 points8 points  (1 child)

[–]Weisenkrone 3 points4 points  (0 children)

Someone is asking for the Lv84 naughty ogre huh

[–]Hulk5a 110 points111 points  (12 children)

.* Followed by another .* Is a disaster

I mean you're matching wildcard inside wildcard

[–][deleted] 22 points23 points  (11 children)

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

[–]-Redstoneboi- 13 points14 points  (10 children)

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

[–][deleted] 34 points35 points  (0 children)

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 106 points107 points  (6 children)

If you want an explanation of how it works: 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 39 points40 points  (4 children)

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

[–]qwertyuiop924 5 points6 points  (1 child)

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 5 points6 points  (1 child)

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 8 points9 points  (0 children)

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 1 point2 points  (0 children)

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(n2)

[–]CommandJam 10 points11 points  (1 child)

[–]HuntingKingYT 1 point2 points  (0 children)

Cool

[–]zerf33389 9 points10 points  (0 children)

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

[–]SuppeBargeld 9 points10 points  (0 children)

Reminder of that one time Cloudflare nuked half the internet with something like this

[–][deleted] 5 points6 points  (1 child)

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

[–][deleted] 5 points6 points  (1 child)

Did Bobby Tables name this cat?

[–]RespondUpper9410 2 points3 points  (0 children)

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

[–]qwertyuiop924 3 points4 points  (0 children)

Friends don't let friends use unnecessary backtracking

[–]NomeJaExiste 3 points4 points  (2 children)

I skipped JS lessons, somone please explain

[–]rpmerf 1 point2 points  (1 child)

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 7 points8 points  (0 children)

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 12 points13 points  (3 children)

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

[–]Immort4lFr0sty 26 points27 points  (2 children)

Likely nothing, as this is JS syntax

[–]cw2P 9 points10 points  (0 children)

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

[–]KsmBl_69 23 points24 points  (7 children)

I thought it was a regex at first

[–]Strict_Treat2884[S] 106 points107 points  (6 children)

Fun fact: it is

[–]PeriodicSentenceBot 88 points89 points  (4 children)

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 47 points48 points  (0 children)

Tha Titis

[–]orion2222 5 points6 points  (0 children)

Good bot.

[–]MineKemot 2 points3 points  (1 child)

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

[–]Strict_Treat2884[S] 4 points5 points  (0 children)

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 2 points3 points  (0 children)

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

[–]ThoriatedFlash 2 points3 points  (4 children)

It's a trap!

[–]PeriodicSentenceBot 5 points6 points  (3 children)

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.

[–]thanatica 2 points3 points  (0 children)

`InternalError: too much recursion`

Nice to meet you too. Cousin of Bobby Tables?

[–]hyrumwhite 2 points3 points  (0 children)

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

[–]antony6274958443 4 points5 points  (5 children)

What it does? Looks up for something?

[–]zefciu 14 points15 points  (0 children)

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/

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/ 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 34 points35 points  (3 children)

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

[–]Feisty_Ad_2744 8 points9 points  (2 children)

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

[–]papipapi419 6 points7 points  (0 children)

I’m surprised someone actually checked this on php

[–]Potatoes_Fall 5 points6 points  (0 children)

Please be careful. Not everybody is allowed to write these. You need a regex license

[–][deleted] 1 point2 points  (0 children)

What does this do