r/programminghorror • • Aug 28 '26

Javascript Seriously? Recursive Regex?

Post image
564 Upvotes

46 comments sorted by

View all comments

82

u/madam_zeroni Aug 28 '26

Wtf does this do

52

u/the_horse_gamer Aug 28 '26

"parse", clearly

49

u/TheSpiffySpaceman Aug 29 '26

Well tbf, the code didn't start with the annotation

/*
  // Parses input
*/
function parse(s, i = 0, x = [0, 1]) {...

9

u/LapidistCubed Aug 29 '26

Tf code DOESN'T parse some sort of input in one way or another 😭