Apart from the security concern, it's much easier, faster and shorter to use placeholders instead of trying to mangle the data into submission yourself. Probably there will be data in one of the files in the next batch which your regex won't catch. Why risk corrupt data or staring at the regex again when there is a perfectly good solution to your problem?