Reputation: 37
I know there's similar question, but in my case the solution didn't work since there's no valid delimiter.
I have a string inside a column:
{"module-version": "2.0", "more-details-link": ""}, "has-cve": true, "issue-package": "VM-Essentials", "legacy-scan-status": "removed"}
I need the inside of issue-package. I tried:
REGEXP_EXTRACT(details_issues.issue_raw,r'\"issue-package=(.+?)\,')
But i'm getting Null inside the column. Any suggestions?
Upvotes: 0
Views: 83
Reputation: 39027
If this is a JSON string, you should use JSON_* functions instead.
You can try something like:
JSON_EXTRACT(details_issues.issue_raw, '$.issue-package')
Upvotes: 1