Created
January 23, 2025 08:05
-
-
Save tuldok89/3fb59fd116bbae28ac2cb00e9f8b51a9 to your computer and use it in GitHub Desktop.
Regex Extractor for Google Sheets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getField2(str, property) { | |
const regex = /\{(?:[^{}]|((?:\{[^{}]*\})))*\}/g; | |
const matches = str.match(regex); | |
const obj = JSON.parse(matches[0]); | |
return obj[property]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment