i told him this is usually a local-variable-reference issue, and to look in that direction. later that day, i thought i'd see if chatgpt can help. i started having a conversation with it. pasted the code, he suggested fixes (regex syntax, function arguments as references,...)