Removing Temporary Escape Characters in JavaScript...
Basic Example:
I have the following string:
"[x^::^^y]"
And the output should be:
"[x::^y]"
Essentially, any occurrences of ^ that do not neighbor another ^ should be removed, and any occurences of ^^ should be replaced with ^
More Examples:
.parse("[^^x:^y^:^^^^^^]") // output: "[^x:y:^^^]"
.parse("[^x:^^^^y^^^z]") // output: "[x:^^y^z]"
It will be part of the parsing script for a JSON alternative that I'm developing to hopefully reduce file sizes for internal storage files.