Hi,
I am trying to extract a part of a string and I am having some trouble, as I am not super familiar with Regular Expressions.
This is the string I have:
[{"code":"CASE","value":"AAA"},{"code":"PROJECT","value":"12356"}]
I would like to try and obtain a column that gives me every time the value which in this case is "AAA".
This is what I have tried so far, but it seems like it doesn't work and I was wondering if someone has an easy tweak / solution to this already:
regexp_matches("public"."ccOrderItems"."orderCodes", '"code":"CASE","value":"([0-9]+)', 'g')
These are my troubleshoot info:
{
"browser-info": {
"language": "en-GB",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.11+9",
"java.vendor": "AdoptOpenJDK",
"java.vendor.url": "https://adoptopenjdk.net/",
"java.version": "11.0.11",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.11+9",
"os.name": "Linux",
"os.version": "4.14.225-168.357.amzn2.x86_64",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"googleanalytics",
"postgres",
"mongo"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "12.5"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.18"
}
},
"run-mode": "prod",
"version": {
"date": "2021-04-27",
"tag": "v0.39.1",
"branch": "release-x.39.x",
"hash": "6beba48"
},
"settings": {
"report-timezone": "Europe/London"
}
}
}
Thanks a lot in advance for your help!