Skip to content

Instantly share code, notes, and snippets.

@iameli
Created May 11, 2018 23:45
Show Gist options
  • Select an option

  • Save iameli/237a1922512ae847d6d6c6bec76c2eb9 to your computer and use it in GitHub Desktop.

Select an option

Save iameli/237a1922512ae847d6d6c6bec76c2eb9 to your computer and use it in GitHub Desktop.
let inputString = `
{
"records": [
{
"id": "1Q3"
},
{
"id": "1D3"
},
{
"id": 1E3000
}
]
}
`;
inputString = inputString.replace(/(\d+E\d+)/g, `"$1"`);
console.log(inputString);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment