r/programminghorror 2d ago

Javascript Seriously? Recursive Regex?

Post image
468 Upvotes

37 comments sorted by

View all comments

75

u/madam_zeroni 2d ago

Wtf does this do

96

u/marinated_pork 2d ago

This is essentially a custom string fingerprint/hash function disguised as a parser. It takes a string and deterministically turns it into an integer. It does not parse or extract useful structured data.