Hello,
I'm using Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production.
I try to replace single whitespace in a certain part of a longer text. I have
SELECT REGEXP_REPLACE(' {
"Quantity": 5,
"ObjectTypeId": 1,
"Name": "IT Equipment (Hardware)",
"Manufacturer": "Other",
"NetPricePerObject": 623.7000000000,
"SerialNumber": null,
"Details": "HP ProDesk 400 G7 MT i5-10500 (DE)"
},'
,'("Details": ")([[:space:]])(")','\1_\3')
FROM DUAL
As result I expect:
{
"Quantity": 5,
"ObjectTypeId": 1,
"Name": "IT Equipment (Hardware)",
"Manufacturer": "Other",
"NetPricePerObject": 623.7000000000,
"SerialNumber": null,
"Details": "HP_ProDesk_400_G7_MT_i5-10500_(DE)"
},
I have tried really a lot of search strings but I don't get it to work.
With Oracle12 I didn't find a command for manipulation a JSON, so I tried to use regular expression.
All help is appreciated.
Regards Carsten