I just about went nuts trying to get the right incantation of a Regex for JavaScript to do a simple job of parsing out the device name from a MQTT String so I decided to share because I didn't find it here.
I've used Regex infrequently for decades but every damn language/system has its own take on what is a special character, quote or not, single or double quote if used...
I skipped over your topic as i dont know influx. Had you said "help splitting value from topic to make new msg" - it would have been open to a wider audience than "MQTT to InfuxDB"
I have to point out that the terms are mixed up there. The string is JSON. JSON is by definition a string. When you set the MQTT node to output parsed JSON that means that it parses the JSON string and outputs the result, which is a javascript object.