in reply to Bizzare comma bug

Your code DOES work. I just set up a table and tried it and was unable to reproduce the result you are getting unless I commented out the regex replacement.

Are you running the exact code you posted or did you strip something out? I would break this out to another script so you eliminate any other factors. As posted your code works.

But, the other responses are correct... use placeholders.