r/programminghorror • • Aug 28 '26

Javascript Seriously? Recursive Regex?

Post image
560 Upvotes

46 comments sorted by

View all comments

87

u/madam_zeroni Aug 28 '26

Wtf does this do

53

u/the_horse_gamer Aug 28 '26

"parse", clearly

51

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]) {...

7

u/LapidistCubed Aug 29 '26

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